@import "tailwindcss"; /* class-based dark mode (toggled on ) instead of media query */ @custom-variant dark (&:where(.dark, .dark *)); @theme { /* wiwi brand accent: indigo→violet "iris" ramp */ --color-brand-50: #f3f1ff; --color-brand-100: #e9e5ff; --color-brand-200: #d6cdff; --color-brand-300: #b9a8fd; --color-brand-400: #9d7cfa; --color-brand-500: #8757f7; --color-brand-600: #7442ed; --color-brand-700: #6333d1; --color-brand-800: #512bab; --color-brand-900: #43278c; --color-brand-950: #291560; } :root { color-scheme: dark; overflow-x: clip; scroll-behavior: smooth; } body { @apply bg-zinc-100 text-zinc-900 antialiased dark:bg-zinc-950 dark:text-zinc-100; overflow-x: clip; } @media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } } /* thin scrollbars for log tables */ * { scrollbar-width: thin; } /* -- login page: motion (gated for reduced motion) ------------------------- */ @media (prefers-reduced-motion: no-preference) { .wiwi-enter { animation: wiwi-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; } .wiwi-flow { animation: wiwi-dash 1.5s linear infinite; } .wiwi-pulse { animation: wiwi-pulse 2.4s ease-in-out infinite; } .wiwi-shake { animation: wiwi-shake 0.3s ease-in-out both; } } @keyframes wiwi-enter { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } } @keyframes wiwi-dash { to { stroke-dashoffset: -16; } } @keyframes wiwi-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } @keyframes wiwi-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } } /* -- login page: hub glow pulse --------------------------------------------- */ @media (prefers-reduced-motion: no-preference) { .wiwi-hub-pulse { animation: wiwi-hub-glow 3.2s ease-in-out infinite; } } @keyframes wiwi-hub-glow { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } } /* -- login page: button shimmer sweep --------------------------------------- */ .wiwi-shimmer { position: relative; overflow: hidden; } .wiwi-shimmer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%); transform: translateX(-100%); pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .wiwi-shimmer:not(:disabled):hover::after { animation: wiwi-shimmer-sweep 0.7s ease-out; } } @keyframes wiwi-shimmer-sweep { to { transform: translateX(100%); } } /* -- login page: aurora color blobs (Linear-look) --------------------------- */ .wiwi-aurora { filter: blur(70px); will-change: transform; } @media (prefers-reduced-motion: no-preference) { .wiwi-aurora { animation: wiwi-drift 22s ease-in-out infinite; } } @keyframes wiwi-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(36px, -24px) scale(1.1); } 66% { transform: translate(-28px, 32px) scale(0.92); } } /* -- login page: animated conic-gradient border ----------------------------- */ @property --conic-angle { syntax: ""; initial-value: 0deg; inherits: false; } .wiwi-conic-border { position: relative; padding: 1px; border-radius: 16px; background: conic-gradient( from var(--conic-angle), rgba(59, 130, 246, 0.25), rgba(168, 85, 247, 0.15), rgba(59, 130, 246, 0.03), rgba(168, 85, 247, 0.03), rgba(59, 130, 246, 0.25) ); } @media (prefers-reduced-motion: no-preference) { .wiwi-conic-border { animation: wiwi-conic-spin 6s linear infinite; } } @keyframes wiwi-conic-spin { to { --conic-angle: 360deg; } } /* Glass card — near-solid so it reads as an object floating over pure black. Backdrop blur still catches the light streaks passing behind it. */ .wiwi-glass-card { background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); } /* Top specular highlight line — brighter now that the card sits on pure black, otherwise the card's top edge disappears into the backdrop. */ .wiwi-top-highlight { background: linear-gradient( 90deg, transparent, rgba(96, 165, 250, 0.5), rgba(168, 85, 247, 0.3), transparent ); } @layer components { /* ─── Admin Design System (cloned from the Dra console) ────────────────────── Dark-only console: near-black surfaces, hairline white borders, blue accent with a violet secondary, tiny uppercase labels, mono tabular values. */ [data-admin] { --admin-bg: #050505; --admin-surface: #0a0a0a; --admin-surface-elevated: #0e0e0e; --admin-border: rgba(255, 255, 255, 0.04); --admin-border-hover: rgba(255, 255, 255, 0.08); --admin-text: #ffffff; --admin-text-muted: #9ca3af; /* gray-500 (#6b7280) measured 4.0:1 on the near-black surfaces — just under WCAG AA for the small caption sizes this token is used at. gray-450 keeps the "dim" intent at a compliant ratio. */ --admin-text-dim: #848c99; --admin-accent: #3b82f6; --admin-accent-soft: rgba(59, 130, 246, 0.1); --admin-accent-glow: rgba(59, 130, 246, 0.2); --admin-accent-purple: #a855f7; --admin-accent-violet: #7c3aed; --admin-success: #34d399; --admin-warning: #fbbf24; --admin-danger: #f87171; --admin-radius: 14px; --admin-radius-sm: 8px; --admin-radius-lg: 20px; } /* Admin ambient glow layers */ .admin-glow-blue { background: radial-gradient( 600px circle at var(--x, 50%) var(--y, 0%), rgba(59, 130, 246, 0.04) 0%, transparent 70% ); } .admin-glow-violet { background: radial-gradient( 500px circle at var(--x, 50%) var(--y, 100%), rgba(124, 58, 237, 0.03) 0%, transparent 70% ); } /* Admin scrollbar */ .admin-scroll { scrollbar-width: thin; scrollbar-color: rgba(99, 102, 241, 0.25) transparent; } .admin-scroll::-webkit-scrollbar { width: 3px; } .admin-scroll::-webkit-scrollbar-track { background: transparent; } .admin-scroll::-webkit-scrollbar-thumb { background: linear-gradient( 180deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.3) ); border-radius: 10px; } /* Admin surface card */ .admin-card { background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: var(--admin-radius); transition: border-color 0.3s ease, box-shadow 0.3s ease; position: relative; overflow: hidden; } .admin-card:hover { border-color: var(--admin-border-hover); box-shadow: 0 0 40px -12px rgba(59, 130, 246, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.02); } .admin-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient( 90deg, transparent, rgba(59, 130, 246, 0.08), rgba(124, 58, 237, 0.05), transparent ); opacity: 0; transition: opacity 0.4s ease; pointer-events: none; } .admin-card:hover::before { opacity: 1; } /* Admin table */ .admin-table { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); overflow: hidden; background: var(--admin-surface); } .admin-table thead tr { background: rgba(255, 255, 255, 0.01); border-bottom: 1px solid var(--admin-border); } .admin-table th { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--admin-text-muted); padding: 14px 20px; text-align: left; white-space: nowrap; } .admin-table td { padding: 12px 20px; font-size: 13px; color: var(--admin-text); border-bottom: 1px solid rgba(255, 255, 255, 0.02); white-space: nowrap; } .admin-table tbody tr { transition: background 0.15s ease; } .admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.015); } .admin-table tbody tr:last-child td { border-bottom: none; } .admin-table thead { position: sticky; top: 0; z-index: 2; background: var(--admin-surface); } /* Log tables (request + proxy logs). Their rows carry far more columns than a phone can show, so the page hides the low-priority ones below a breakpoint and the cells give their gutters back: 15 columns × 40px of default padding was 600px of the row before any content. On touch screens the row is also grown past the 44px tap-target floor — a log row is a button here. */ .admin-table-logs th, .admin-table-logs td { padding-inline: 14px; } @media (max-width: 640px) { .admin-table-logs th, .admin-table-logs td { padding-inline: 10px; } } @media (pointer: coarse) { .admin-table-logs td { padding-block: 16px; } } /* Request-log rows are the page's primary navigation, so their hover is an accent-tinted gradient (not the generic flat lift) — a faint blue→violet wash matching the site's beam identity. Scoped to the logs table so the config tables keep their neutral hover. */ .admin-table-logs tbody tr:hover { background: linear-gradient( 90deg, rgba(59, 130, 246, 0.045) 0%, rgba(124, 58, 237, 0.03) 50%, rgba(59, 130, 246, 0.045) 100% ); } .admin-table-logs tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 0 rgba(96, 165, 250, 0.45); } /* -- Filter deck ------------------------------------------------------------ The request-logs toolbar as one bordered surface, so search, dropdowns and the segmented toggles read as a single control band. */ .admin-filter-deck { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); } .admin-filter-deck-rule { flex: 0 0 1px; align-self: stretch; width: 1px; background: var(--admin-border); } /* Segmented control — replaces the status/range dropdowns. A reader flips between four statuses or eight ranges constantly; a one-click pill beats opening a menu every time. The pressed state is a quiet surface lift, the same treatment selects and tabs elsewhere in the console use. */ .admin-segment { display: inline-flex; align-items: center; gap: 1px; padding: 2px; border: 1px solid var(--admin-border); border-radius: 8px; background: rgba(0, 0, 0, 0.25); } .admin-segment-btn { min-height: 28px; padding: 0 10px; border: none; border-radius: 6px; background: transparent; color: var(--admin-text-dim); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; white-space: nowrap; } .admin-segment-btn:hover:not([aria-pressed="true"]) { color: var(--admin-text-muted); background: rgba(255, 255, 255, 0.04); } .admin-segment-btn:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: 1px; } .admin-segment-btn[aria-pressed="true"] { color: var(--admin-text); background: rgba(255, 255, 255, 0.07); } @media (pointer: coarse) { .admin-segment-btn { min-height: 40px; padding: 0 12px; } } /* -- Admin badge */ .admin-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.6; /* Never break a label mid-word. The uppercase + letter-spacing makes "OpenAI Responses" wider than a narrow phone column, and without this the flex item wrapped as "OPENAI RESPONSE / S" — a broken word, not a broken layout. `white-space: nowrap` keeps each badge whole; the container wraps BETWEEN badges instead, which is what a reader expects. No `overflow: hidden` / `max-width` here on purpose: a badge inside a narrow table cell is *wider* than its cell, and clipping it hid the label entirely ("openai-compatible" became "openai-compatibl…"). Overflowing the cell is the lesser evil — the text stays readable — and the table itself scrolls. */ white-space: nowrap; } .admin-badge-green { color: #34d399; background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.15); } .admin-badge-red { color: #f87171; background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.15); } .admin-badge-amber { color: #fbbf24; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.15); } .admin-badge-blue { color: rgba(59, 130, 246, 0.8); background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.15); } .admin-badge-violet { color: rgba(168, 85, 247, 0.8); background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.15); } .admin-badge-gray { color: var(--admin-text-dim); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--admin-border); } /* Admin alert — block status notice (tone follows the badge palette so a notice and its badge read as the same severity). */ .admin-alert { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--admin-radius-sm); border: 1px solid var(--admin-border); background: rgba(255, 255, 255, 0.02); padding: 10px 12px; font-size: 12px; color: var(--admin-text-muted); } .admin-alert-info { color: var(--admin-accent); background: rgba(59, 130, 246, 0.05); border-color: rgba(59, 130, 246, 0.18); } .admin-alert-success { color: var(--admin-success); background: rgba(52, 211, 153, 0.05); border-color: rgba(52, 211, 153, 0.18); } .admin-alert-warning { color: var(--admin-warning); background: rgba(251, 191, 36, 0.05); border-color: rgba(251, 191, 36, 0.18); } .admin-alert-danger { color: var(--admin-danger); background: rgba(248, 113, 113, 0.05); border-color: rgba(248, 113, 113, 0.18); } /* Admin input */ .admin-input { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--admin-border); border-radius: var(--admin-radius-sm); padding: 8px 12px; font-size: 13px; color: var(--admin-text); outline: none; width: 100%; transition: border-color 0.2s ease, box-shadow 0.2s ease; } .admin-input::placeholder { color: var(--admin-text-dim); } .admin-input:focus { border-color: var(--admin-accent-glow); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08); } /* `type="search"` inputs (Providers / Built-in Providers filters) get Chrome's native clear affordance, which renders as a bright light-theme glyph on our dark surface. Hide it — those inputs ship their own themed clear button — and drop the WebKit search decoration quirks so text sits flush left. */ input[type="search"].admin-input { -webkit-appearance: none; appearance: none; } input[type="search"].admin-input::-webkit-search-decoration, input[type="search"].admin-input::-webkit-search-cancel-button, input[type="search"].admin-input::-webkit-search-results-button { -webkit-appearance: none; appearance: none; display: none; } /* Number-input steppers: hide the glaring browser-default white spinners. The form uses a custom themed stepper (admin-number-stepper) instead, so the native buttons are removed for a consistent dark look. */ input[type="number"].admin-input { -moz-appearance: textfield; appearance: textfield; } input[type="number"].admin-input::-webkit-outer-spin-button, input[type="number"].admin-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } /* Custom themed stepper: − / + buttons on the right of a number field. Uses admin surface/border tokens so it reads as part of the input, not a bright foreign control. */ .admin-number-field { position: relative; } .admin-number-field .admin-input { padding-right: 30px; } .admin-number-stepper { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 26px; display: flex; flex-direction: column; border-left: 1px solid var(--admin-border); border-radius: 0 calc(var(--admin-radius-sm) - 1px) calc(var(--admin-radius-sm) - 1px) 0; overflow: hidden; } .admin-number-stepper button { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: rgba(255, 255, 255, 0.015); color: var(--admin-text-dim); cursor: pointer; transition: background 0.15s ease, color 0.15s ease; line-height: 0; } .admin-number-stepper button + button { border-top: 1px solid var(--admin-border); } .admin-number-stepper button:hover { background: rgba(59, 130, 246, 0.1); color: var(--admin-accent); } .admin-number-stepper button:active { background: rgba(59, 130, 246, 0.16); } .admin-number-stepper button:disabled { opacity: 0.35; cursor: not-allowed; } /* Touch stepper layout lives OUTSIDE this layer — see the "Touch number stepper" block at the end of the file. Inside `@layer components` its padding lost to the caller's `px-*` utility, so the 88px stepper painted over the whole 72px weight field (AUDIT #377). */ select.admin-input option { background: var(--admin-surface-elevated); color: var(--admin-text); } /* Admin button variants */ .admin-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--admin-radius-sm); font-size: 13px; font-weight: 500; border: none; cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; outline: none; white-space: nowrap; } .admin-btn:disabled { cursor: not-allowed; opacity: 0.5; } .admin-btn-primary { background: var(--admin-accent-soft); color: var(--admin-accent); border: 1px solid rgba(99, 102, 241, 0.15); } .admin-btn-primary:hover:not(:disabled) { background: rgba(99, 102, 241, 0.18); border-color: rgba(99, 102, 241, 0.25); box-shadow: 0 0 20px -6px rgba(99, 102, 241, 0.2); } .admin-btn-ghost { background: transparent; color: var(--admin-text-muted); border: 1px solid var(--admin-border); } .admin-btn-ghost:hover:not(:disabled) { color: var(--admin-text); border-color: var(--admin-border-hover); background: rgba(255, 255, 255, 0.02); } .admin-btn-danger { background: rgba(248, 113, 113, 0.08); color: var(--admin-danger); border: 1px solid rgba(248, 113, 113, 0.12); } .admin-btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.2); } /* Keyboard focus ring — MUST come after every `:hover` rule above, and must match their specificity, or a focused-and-hovered primary button loses the ring to `.admin-btn-primary:hover`'s glow (AUDIT #258). The `:not(:disabled)` is what buys the third specificity class; the two-stop ring puts an opaque inner edge against the `#0a0a0a` card surface and an accent outer edge against the `#050505` page background, so it reads on both. */ .admin-btn:focus-visible:not(:disabled) { outline: none; box-shadow: 0 0 0 2px var(--admin-bg), 0 0 0 4px rgba(59, 130, 246, 0.55); } /* Admin section label */ .admin-label { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--admin-text-muted); } /* Admin stat value (gradient text) */ .admin-stat-value { font-weight: 700; letter-spacing: -0.03em; color: #ffffff; font-variant-numeric: tabular-nums; line-height: 1.05; background: linear-gradient(180deg, #ffffff 60%, rgba(255, 255, 255, 0.85)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } /* Stat highlight variant */ .admin-stat-highlight { border-color: rgba(59, 130, 246, 0.06); background: linear-gradient( 135deg, var(--admin-surface) 0%, rgba(59, 130, 246, 0.012) 100% ); } .admin-stat-highlight:hover { border-color: rgba(59, 130, 246, 0.1); } /* Stat tile accent wash — a corner glow tinted by the tile's tone. Rises on hover so featured tiles read as live surfaces rather than static cards. */ .admin-stat-wash { opacity: 0.7; transition: opacity 0.4s ease; } .admin-card:hover .admin-stat-wash { opacity: 1; } @media (prefers-reduced-motion: reduce) { .admin-stat-wash { transition: none; } } /* Live badge + pulse dot */ .admin-live-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 6px; font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(59, 130, 246, 0.7); background: linear-gradient( 135deg, rgba(59, 130, 246, 0.06), rgba(124, 58, 237, 0.04) ); border: 1px solid rgba(59, 130, 246, 0.08); } @keyframes admin-pulse-dot { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } } .admin-pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--admin-accent); animation: admin-pulse-dot 2s ease-in-out infinite; } /* Topbar */ .admin-topbar { backdrop-filter: blur(12px) saturate(1.2); background: rgba(5, 5, 5, 0.75); border-bottom: 1px solid rgba(255, 255, 255, 0.03); } .admin-topbar-border { background: linear-gradient( 90deg, transparent 0%, rgba(59, 130, 246, 0.06) 20%, rgba(124, 58, 237, 0.04) 50%, rgba(59, 130, 246, 0.06) 80%, transparent 100% ); } /* Keyboard shortcut chip */ .admin-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; font-size: 9px; font-family: var(--font-mono), ui-monospace, monospace; font-weight: 600; color: var(--admin-text-dim); background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.04); border-radius: 4px; line-height: 1; } /* Empty state */ .admin-empty-state { border-style: dashed; border-color: var(--admin-border); background: rgba(255, 255, 255, 0.004); } /* Skeleton shimmer */ @keyframes admin-skeleton { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } } .admin-skeleton { background: linear-gradient( 90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.02) 75% ); background-size: 200% 100%; animation: admin-skeleton 1.8s ease-in-out infinite; border-radius: 6px; } /* Stagger fade-up entrance */ @keyframes admin-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } .admin-stagger > * { animation: admin-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; } .admin-stagger > *:nth-child(1) { animation-delay: 0ms; } .admin-stagger > *:nth-child(2) { animation-delay: 60ms; } .admin-stagger > *:nth-child(3) { animation-delay: 120ms; } .admin-stagger > *:nth-child(4) { animation-delay: 180ms; } .admin-stagger > *:nth-child(5) { animation-delay: 240ms; } .admin-stagger > *:nth-child(6) { animation-delay: 300ms; } .admin-stagger > *:nth-child(7) { animation-delay: 360ms; } .admin-stagger > *:nth-child(8) { animation-delay: 420ms; } @media (prefers-reduced-motion: reduce) { .admin-stagger > * { animation: none; opacity: 1; } .admin-pulse-dot { animation: none; opacity: 0.6; } .admin-skeleton { animation: none; } } /* ─── Dashboard polish: delta chips, waiting pulse, chart tooltip ─────────── */ .admin-delta-chip { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 1px 7px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; line-height: 16px; font-weight: 500; } .admin-delta-up { color: #34d399; background: rgba(52, 211, 153, 0.08); } .admin-delta-down { color: #f87171; background: rgba(248, 113, 113, 0.08); } .admin-delta-flat { color: var(--admin-text-dim); background: rgba(255, 255, 255, 0.04); } @keyframes admin-waiting-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } } .admin-waiting-pulse { animation: admin-waiting-pulse 2.4s ease-in-out infinite; } .admin-chart-tooltip { background: rgba(10, 10, 10, 0.96); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 8px 10px; font-size: 12px; } .admin-chart-tooltip .tt-value { font-weight: 600; color: #f4f4f5; } .admin-chart-tooltip .tt-series { color: #9ca3af; } /* Dialog entrance: quiet fade for the scrim, lift+blur for the panel */ @keyframes admin-overlay-in { from { opacity: 0; } to { opacity: 1; } } @keyframes admin-dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.985); filter: blur(3px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } } .admin-overlay-enter { animation: admin-overlay-in 0.18s ease-out both; } .admin-dialog-enter { animation: admin-dialog-in 0.24s cubic-bezier(0.22, 1, 0.36, 1) both; } /* Drawer (right-side slide-in panel) */ @keyframes admin-drawer-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } } .admin-drawer-enter { animation: admin-drawer-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; } /* Log detail section card — subtle surface for grouped metadata blocks */ .admin-detail-section { border: 1px solid var(--admin-border); border-radius: var(--admin-radius-sm); background: rgba(255, 255, 255, 0.015); overflow: hidden; } .admin-detail-section-head { padding: 10px 14px; border-bottom: 1px solid var(--admin-border); background: rgba(255, 255, 255, 0.008); } /* Metric pill — compact inline stat used in detail panels */ .admin-metric-pill { display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: var(--admin-radius-sm); border: 1px solid var(--admin-border); background: rgba(255, 255, 255, 0.015); min-width: 0; } .admin-metric-pill-label { font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--admin-text-dim); white-space: nowrap; } .admin-metric-pill-value { font-family: var(--font-mono, ui-monospace, monospace); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--admin-text); font-variant-numeric: tabular-nums; } @media (prefers-reduced-motion: reduce) { .admin-overlay-enter, .admin-dialog-enter, .admin-drawer-enter { animation: none; } } @media (prefers-reduced-motion: reduce) { .admin-waiting-pulse { animation: none; } } /* ─── Settings: console preferences (toggled via classes) ────────────── */ /* user-requested motion reduction overrides *all* console animations */ .reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; } /* compact density: tighten table padding, stat tiles, and badges */ .ui-compact .admin-table th { padding: 10px 16px; } .ui-compact .admin-table td { padding: 8px 16px; font-size: 12px; } /* Settings tab strip */ .admin-tabs { display: flex; gap: 2px; padding: 4px; background: rgba(255, 255, 255, 0.015); border: 1px solid var(--admin-border); border-radius: var(--admin-radius-sm); } .admin-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--admin-text-muted); cursor: pointer; transition: color 0.2s ease, background 0.2s ease; white-space: nowrap; border: none; background: transparent; } .admin-tab:hover { color: var(--admin-text); background: rgba(255, 255, 255, 0.02); } .admin-tab[data-active="true"] { color: var(--admin-accent); background: var(--admin-accent-soft); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12); } /* Settings: description list (key/value meta rows) */ .admin-dl { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 0; } .admin-dl dt { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--admin-text-dim); padding: 11px 0; border-bottom: 1px solid var(--admin-border); } .admin-dl dd { font-size: 13px; color: var(--admin-text); padding: 11px 0; border-bottom: 1px solid var(--admin-border); margin: 0; word-break: break-word; } .admin-dl > dt:last-child, .admin-dl > dd:last-child { border-bottom: none; } /* Settings: row toggle item — label + description on the left, control right */ .admin-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--admin-border); } .admin-setting-row:last-child { border-bottom: none; } .admin-setting-row-title { font-size: 13px; font-weight: 500; color: var(--admin-text); } .admin-setting-row-desc { font-size: 11px; color: var(--admin-text-dim); margin-top: 2px; line-height: 1.4; } /* ─── Sidebar: identity card + collapse button ─────────────────────────────── */ /* Identity card: subtle hover glow + active sheen */ .admin-identity::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient( 120px circle at 20% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 70% ); opacity: 0; transition: opacity 0.4s ease; pointer-events: none; } .admin-identity:hover::after { opacity: 1; } /* Collapse button: focused ring for keyboard users */ .admin-collapse-btn:focus-visible { outline: none; border-color: var(--admin-accent-glow); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); } } /* -- docs page: reference manual in the site's hero language --------------- A public documentation page, not a console screen. The masthead is a full-bleed band on the page background — the same beam backdrop, gradient headline and CTA treatment the landing page uses — and the body is a reference manual: a sticky rail that tracks the reader, hairline-separated sections, tabbed code samples, and a searchable endpoint list. All tokens come from the shared admin design system (--admin-*). */ .docs-grid { display: grid; grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; } .docs-grid > * { min-width: 0; } .docs-mobile-jump { position: relative; z-index: 5; } .docs-section-select { font-family: inherit; } /* ── masthead ──────────────────────────────────────────────────────────── Full-bleed and borderless, standing on the page background rather than floating in a card. The ambient effects are the site's own: the animated beam backdrop and the panning grid from the landing hero. */ .docs-masthead { position: relative; isolation: isolate; overflow: hidden; background: var(--admin-bg); } /* Display heading — the accent word carries the site's animated gradient, the rest is solid white, and the two never orphan each other. */ .docs-display { font-size: clamp(2.25rem, 6.5vw, 4.25rem); font-weight: 600; line-height: 1.02; letter-spacing: -0.032em; color: var(--admin-text); text-wrap: balance; } .docs-lead { max-width: 44rem; margin: 1.25rem auto 0; font-size: 15px; line-height: 1.75; color: var(--admin-text-muted); /* Keeps the last line from collapsing to a single orphan word. */ text-wrap: pretty; } @media (min-width: 640px) { .docs-lead { font-size: 16px; } } /* ── how it works ─────────────────────────────────────────────────────── The hub-and-spoke diagram, free-standing on the page — the landing page renders the same idea the same way, as a section rather than a card. */ .docs-graph { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 4.5rem) 0; } .docs-graph-inner { position: relative; z-index: 1; margin: 0 auto; max-width: 56rem; padding: 0 1.5rem; text-align: center; } .docs-graph-title { margin-top: 0.75rem; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; color: var(--admin-text); text-wrap: balance; } .docs-graph-sub { max-width: 58ch; margin: 0.9rem auto 0; font-size: 15px; line-height: 1.7; color: var(--admin-text-muted); } /* The shared blue badge is tuned for the console, where it sits on a lighter surface. On the near-black hero its 80%-alpha blue falls under 4.5:1 at 10px, so the docs hero lifts it to the 300-weight step. */ .docs-masthead .admin-badge-blue { color: #93c5fd; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.22); } /* "Live" chip — a soft status pill that says the gateway is running. */ .docs-chip-live { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(52, 211, 153, 0.22); border-radius: 999px; background: rgba(52, 211, 153, 0.08); padding: 3px 10px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; color: #6ee7b7; } .docs-chip-live-dot { width: 5px; height: 5px; border-radius: 999px; background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.9); } @media (prefers-reduced-motion: no-preference) { .docs-chip-live-dot { animation: docs-blink 2.6s ease-in-out infinite; } } @keyframes docs-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } } /* ── live translation diagram ─────────────────────────────────────────── The how-it-works visual: three inbound dialects, the wiwi IR hub, four upstream providers, and a beam travelling along every edge. It stands free on the page — no card, no border — the way the landing page renders its own graph section. The hub sits above the beam layer, and every node is positioned so the beams connect real elements. */ .docs-core { position: relative; margin-top: clamp(2rem, 4vw, 3rem); } .docs-core-body { position: relative; display: grid; grid-template-rows: auto auto auto; justify-items: center; align-items: center; gap: 30px; min-height: 300px; padding: 26px 18px 28px; } .docs-core-row { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: 100%; } .docs-core-row-out { gap: 10px; } .docs-core-dialect { position: relative; z-index: 2; max-width: 100%; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 9px; background: rgba(10, 10, 10, 0.9); padding: 6px 10px; font-size: 10.5px; line-height: 1; white-space: nowrap; } .docs-core-dialect-text { letter-spacing: 0.01em; } .docs-core-provider { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 11px; background: rgba(10, 10, 10, 0.9); padding: 8px; transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease; } .docs-core-provider:hover { transform: translateY(-1px) scale(1.04); border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); } .docs-core-hub-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; } .docs-core-hub { position: relative; display: flex; align-items: center; justify-content: center; width: 62px; height: 62px; border: 1px solid rgba(167, 139, 250, 0.32); border-radius: 9999px; background: radial-gradient(circle at 50% 30%, rgba(167, 139, 250, 0.16), rgba(10, 10, 10, 0.9)); box-shadow: 0 0 40px -10px rgba(139, 92, 246, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1); } .docs-core-hub-logo { width: 32px; height: 32px; border-radius: 9999px; object-fit: cover; } .docs-core-hub-ring { position: absolute; inset: -7px; border: 1px solid rgba(167, 139, 250, 0.22); border-radius: 9999px; } @media (prefers-reduced-motion: no-preference) { .docs-core-hub-ring { animation: docs-hub-pulse 3.4s ease-in-out infinite; } } @keyframes docs-hub-pulse { 0%, 100% { transform: scale(1); opacity: 0.55; } 50% { transform: scale(1.13); opacity: 0.12; } } .docs-core-hub-label { border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 999px; background: rgba(10, 10, 10, 0.85); padding: 2px 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--admin-text-muted); } .docs-core-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 20px; margin-top: 1.75rem; } .docs-core-foot-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--admin-text-muted); } .docs-core-foot-dot { width: 5px; height: 5px; border-radius: 999px; } /* ── left rail ────────────────────────────────────────────────────────── A hairline spine with a progress fill, so the reader's position in the document is always visible without reading a number. */ .docs-sidebar { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 116px); overflow-y: auto; padding-left: 16px; } @media (max-width: 1023px) { .docs-grid { grid-template-columns: 1fr; } .docs-sidebar { display: none; } } .docs-rail { position: relative; padding-left: 12px; } .docs-rail-line { position: absolute; top: 8px; bottom: 8px; left: 0; width: 1px; background: var(--admin-border); } .docs-rail-line-fill { position: absolute; top: 8px; left: 0; width: 1px; border-radius: 1px; background: linear-gradient(180deg, #60a5fa, #a78bfa); box-shadow: 0 0 10px rgba(96, 165, 250, 0.5); transition: height 0.15s linear; } /* Sections are separated by hairlines, not cards. */ .docs-section { position: relative; scroll-margin-top: 96px; padding-top: clamp(2rem, 4.5vw, 3rem); border-top: 1px solid rgba(255, 255, 255, 0.07); } .docs-section:first-child { padding-top: 0; border-top: 0; } /* Section navigation */ .docs-nav-item { position: relative; min-height: 36px; transition: color 0.2s ease, background-color 0.2s ease; } .docs-nav-item:hover, .docs-nav-item:focus-visible { color: var(--admin-text); } .docs-nav-item:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28); } .docs-nav-item.is-active { color: #bfdbfe; } /* The active marker sits on the rail spine itself, so "you are here" and "how far in you are" are the same line. */ .docs-nav-item.is-active::before { content: ""; position: absolute; left: -12px; top: 20%; bottom: 20%; width: 2px; border-radius: 2px; background: linear-gradient(180deg, #60a5fa, #a78bfa); box-shadow: 0 0 12px rgba(96, 165, 250, 0.55); } /* Completed-section marker: a tick replaces the number, tinted like the active spine so "done" reads as a lighter form of "here". */ .docs-nav-num { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; transition: color 0.2s ease, opacity 0.2s ease; } .docs-nav-num.is-done { color: #4ade80; opacity: 0.85; } /* Rail footer: a 2px progress track. scaleX (not width) keeps the transform on the compositor, so scrolling never triggers a layout on this element. */ .docs-rail-progress { min-width: 0; } .docs-rail-track { height: 2px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.05); } .docs-rail-fill { height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, #3b82f6, #8b5cf6 55%, #d946ef); transition: transform 0.12s linear; } /* ── section headings ─────────────────────────────────────────────────── A numbered eyebrow, then the title in gradient ink. The rule under the eyebrow is the same accent as the rail spine, tying the two together. */ .docs-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--admin-text-dim); } .docs-eyebrow-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: #a78bfa; } .docs-eyebrow-rule { width: 28px; height: 1px; background: linear-gradient(90deg, rgba(167, 139, 250, 0.75), rgba(167, 139, 250, 0)); } .docs-h2 { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.022em; } .docs-h2-text { background: linear-gradient(180deg, #ffffff 20%, #cbd5e1 120%); -webkit-background-clip: text; background-clip: text; color: transparent; } .docs-subtitle { margin-top: 0.35rem; font-size: 13px; color: var(--admin-text-dim); } /* Body prose: a comfortable 72ch measure and an open leading. */ .docs-prose { max-width: 72ch; font-size: 14.5px; line-height: 1.78; color: var(--admin-text-muted); } /* A hairline panel for the inline pipeline strip. */ .docs-panel { border: 1px solid var(--admin-border); border-radius: 14px; background: var(--admin-surface); padding: 15px 16px; } /* Inline pipeline: dialect -> IR -> provider, as mono chips. */ .docs-pipeline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; } .docs-pipe-chip { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 999px; background: rgba(255, 255, 255, 0.02); padding: 0.2rem 0.7rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; line-height: 1; } .docs-pipe-arrow { color: var(--admin-text-dim); font-size: 11px; } /* ── callouts ─────────────────────────────────────────────────────────── A left rule in the section accent with a wash fading to the right. */ .docs-callout { border-left: 2px solid rgba(139, 92, 246, 0.65); border-radius: 0 12px 12px 0; background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0) 72%); padding: 13px 16px; } .docs-callout-label { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #c4b5fd; } .docs-callout-body { margin-top: 6px; max-width: 72ch; font-size: 13px; line-height: 1.7; color: var(--admin-text-muted); } /* ── auth chips + triad ───────────────────────────────────────────────── */ .docs-keychip { display: inline-flex; align-items: center; min-height: 44px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 999px; background: rgba(255, 255, 255, 0.02); padding: 0 0.9rem; font-size: 12px; color: var(--admin-text-muted); } .docs-keychip-plain { color: var(--admin-text-dim); } .docs-triad { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--admin-border); border-radius: 14px; background: var(--admin-border); } @media (min-width: 640px) { .docs-triad { grid-template-columns: repeat(3, minmax(0, 1fr)); } } .docs-triad-cell { min-width: 0; background: var(--admin-surface); padding: 15px 16px; } /* ── endpoint filter ──────────────────────────────────────────────────── */ .docs-filter { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-surface); padding: 0 12px; transition: border-color 0.16s ease, box-shadow 0.16s ease; } .docs-filter:focus-within { border-color: rgba(96, 165, 250, 0.45); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); } .docs-filter-icon { display: flex; color: var(--admin-text-dim); } .docs-filter-input { min-width: 0; flex: 1 1 auto; border: 0; background: transparent; font-family: inherit; font-size: 13px; color: var(--admin-text); outline: none; } .docs-filter-input::placeholder { color: var(--admin-text-dim); } .docs-filter-input::-webkit-search-cancel-button { filter: invert(0.6); } .docs-filter-kbd { border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 6px; background: rgba(255, 255, 255, 0.03); padding: 1px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: var(--admin-text-dim); } .docs-filter-count { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--admin-text-muted); } .docs-empty { color: var(--admin-text-muted); } /* ── code blocks ──────────────────────────────────────────────────────── Flat, with a left accent spine and a lit header rule. */ .docs-codeblock { min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; background: #08090b; box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.16); transition: border-color 0.2s ease, box-shadow 0.2s ease; } .docs-codeblock:hover { border-color: rgba(96, 165, 250, 0.26); box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.32); } .docs-codehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--admin-border); background: rgba(255, 255, 255, 0.015); padding: 4px 10px 4px 12px; } .docs-copybtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 72px; min-height: 30px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 7px; background: rgba(255, 255, 255, 0.03); padding: 0 9px; font-size: 10px; font-weight: 500; color: var(--admin-text-dim); transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease; } .docs-copybtn:hover { border-color: rgba(255, 255, 255, 0.14); color: var(--admin-text); } .docs-copybtn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.45); } .docs-codeblock pre { max-width: 100%; scrollbar-width: thin; } /* Code body: a line-number gutter beside the scrollable pre. The gutter is a flex sibling (not absolutely positioned) so the pre's own horizontal scrollbar never overlaps the numbers, and the gutter itself stays fixed while only the code scrolls. Tabular numerals keep the column aligned. */ .docs-codebody { display: flex; align-items: stretch; min-width: 0; } .docs-codegutter { display: flex; flex: 0 0 auto; flex-direction: column; padding: 12px 8px 12px 10px; border-right: 1px solid rgba(255, 255, 255, 0.05); background: rgba(255, 255, 255, 0.012); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.625; user-select: none; text-align: right; /* Line numbers are real content, not decoration — 0.18 alpha failed the 4.5:1 contrast floor on the #08090b block background. */ color: rgba(255, 255, 255, 0.42); } .docs-codebody > pre { flex: 1 1 auto; min-width: 0; } .docs-pre { overflow-x: auto; padding: 12px 14px; font-size: 12px; line-height: 1.625; scrollbar-width: thin; } .docs-pre:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(96, 165, 250, 0.45); } /* ── code tabs ────────────────────────────────────────────────────────── */ .docs-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .docs-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; border-radius: 8px; padding: 0 10px; font-size: 11px; font-weight: 500; color: var(--admin-text-dim); transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease; } .docs-tab:hover { color: var(--admin-text); background: rgba(255, 255, 255, 0.03); } .docs-tab.is-active { color: #bfdbfe; background: rgba(96, 165, 250, 0.12); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22); } .docs-tab:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.45); } /* Touch devices get a 44px target on every control. */ @media (hover: none) { .docs-copybtn, .docs-tab, .docs-pathcopy { min-height: 44px; } } /* Reduced motion: the beams are SMIL animations, which CSS cannot pause, so the travelling gradient stroke is hidden and only the static connecting path remains. The diagram still reads; it just stops moving. */ @media (prefers-reduced-motion: reduce) { .docs-core svg path:nth-of-type(2) { display: none; } } /* ── provider ecosystem ───────────────────────────────────────────────── Hairline-separated tiles (gap-px over a border fill), each carrying the hue of the wire family it belongs to. The legend above the grid states the same mapping in words, so the hue is decoration and the dot is never the only way to read a tile. */ .docs-provider-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; } .docs-provider-sub { margin-top: 3px; font-size: 11.5px; color: var(--admin-text-muted); } /* The header reuses the section-aside chip, but its text sits on the muted token — the default dim (#6b7280) fails 4.5:1 at this size. */ .docs-provider-head .docs-count-chip { color: var(--admin-text-muted); } .docs-provider-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin-bottom: 10px; overflow: hidden; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-border); list-style: none; } @media (min-width: 768px) { .docs-provider-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); } } .docs-provider-legend-item { min-width: 0; background: var(--admin-surface); padding: 10px 12px 11px; } .docs-provider-legend-top { display: flex; align-items: center; gap: 7px; } .docs-provider-legend-label { min-width: 0; font-size: 11.5px; font-weight: 600; color: var(--admin-text); } /* Count chip: the one saturated element in the legend, so the eye pairs it with the dots in the grid below. */ .docs-provider-legend-count { margin-left: auto; border: 1px solid hsl(var(--f-hue) 80% 62% / 0.24); border-radius: 999px; background: hsl(var(--f-hue) 80% 62% / 0.1); padding: 1px 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; font-variant-numeric: tabular-nums; color: hsl(var(--f-hue) 55% 84%); } .docs-provider-legend-note { display: block; margin-top: 4px; font-size: 11px; line-height: 1.5; color: var(--admin-text-muted); } .docs-provider-dot { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 999px; background: hsl(var(--f-hue) 80% 62%); box-shadow: 0 0 7px hsl(var(--f-hue) 85% 62% / 0.6); } .docs-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-border); } @media (min-width: 640px) { .docs-provider-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } } .docs-provider-item { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 104px; background: var(--admin-surface); padding: 16px 10px 13px; transition: background-color 0.25s ease; } .docs-provider-item:hover { background: hsl(var(--f-hue) 22% 8%); } /* The mark is a self-contained badge tile (web/public/logos/) that brings its own rounded corners, background and brand colours. The slot therefore adds no frame of its own — a border here would read as a chip inside a chip. The family tint survives as the hover glow instead. */ .docs-provider-logo { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; transition: transform 0.25s ease, filter 0.25s ease; } .docs-provider-item:hover .docs-provider-logo { transform: translateY(-1px); filter: drop-shadow(0 0 10px hsl(var(--f-hue) 85% 70% / 0.55)); } .docs-provider-name { max-width: 100%; overflow: hidden; font-size: 11.5px; font-weight: 500; color: var(--admin-text); text-overflow: ellipsis; white-space: nowrap; } /* The provider type as it is written in `wiwi.yaml`. Dim (#6b7280) fails at this size, so the mono line uses the muted token. */ .docs-provider-id { display: flex; align-items: center; gap: 5px; max-width: 100%; } .docs-provider-id-text { overflow: hidden; font-size: 9.5px; letter-spacing: 0.04em; color: var(--admin-text-muted); text-overflow: ellipsis; white-space: nowrap; } /* Tile entrance: the same stagger the feature grid uses, compressed — this grid is read as a map, so thirteen tiles should not take a second to arrive. */ @media (prefers-reduced-motion: no-preference) { .docs-provider-grid.is-revealed .docs-provider-item { animation: docs-tile-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--f-i, 0) * 28ms); } } /* -- docs §08 Features ------------------------------------------------------ Hairline tiles over one spectrum: each tile receives --f-hue and derives its icon chip, left spine, index, and pointer-tracked spotlight from it. The base state already carries a low-opacity tint, so the tiles read the same on touch devices where there is no hover to intensify them. Tiles marked span="2" break the matrix into a bento rhythm. */ .docs-feature-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: dense; gap: 1px; overflow: hidden; border: 1px solid var(--admin-border); border-radius: 14px; background: var(--admin-border); } @media (min-width: 640px) { .docs-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (min-width: 1180px) { .docs-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } } .docs-feature { --f-ink: hsl(var(--f-hue) 85% 78%); --f-soft: hsl(var(--f-hue) 80% 62% / 0.1); --f-line: hsl(var(--f-hue) 80% 62% / 0.24); position: relative; isolation: isolate; min-width: 0; background: var(--admin-surface); padding: 17px 17px 16px; transition: background-color 0.25s ease; } .docs-feature[data-span="2"] { grid-column: span 2; } @media (max-width: 639px) { .docs-feature[data-span="2"] { grid-column: span 1; } } /* Pointer-tracked spotlight, shared by the feature and provider tiles. Negative z-index keeps it above the tile's own background (painted first inside this stacking context) but under the text. */ .docs-spotlight { position: absolute; inset: 0; z-index: -1; background: radial-gradient( 200px circle at var(--mx, 50%) var(--my, 0%), hsl(var(--f-hue) 80% 62% / 0.14), transparent 70% ); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; } .docs-feature:hover .docs-spotlight, .docs-provider-item:hover .docs-spotlight { opacity: 1; } /* Left spine, lit in the tile's hue */ .docs-feature::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: linear-gradient(180deg, transparent, var(--f-line), transparent); opacity: 0.6; transition: opacity 0.25s ease; pointer-events: none; } .docs-feature:hover::before { opacity: 1; } .docs-feature:hover { background: hsl(var(--f-hue) 22% 8%); } .docs-feature-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .docs-feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--f-line); border-radius: 10px; background: var(--f-soft); color: var(--f-ink); box-shadow: inset 0 1px 0 hsl(var(--f-hue) 90% 82% / 0.07); transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease; } .docs-feature-icon svg { width: 15px; height: 15px; } .docs-feature:hover .docs-feature-icon { transform: translateY(-1px); border-color: hsl(var(--f-hue) 85% 70% / 0.45); background: hsl(var(--f-hue) 80% 62% / 0.17); box-shadow: 0 0 20px -6px hsl(var(--f-hue) 85% 62% / 0.55), inset 0 1px 0 hsl(var(--f-hue) 90% 85% / 0.12); } .docs-feature-index { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; color: var(--admin-text-dim); opacity: 0.75; transition: color 0.25s ease, opacity 0.25s ease; } .docs-feature:hover .docs-feature-index { color: var(--f-ink); opacity: 1; } .docs-feature-title { margin-top: 12px; font-size: 13.5px; font-weight: 600; letter-spacing: -0.012em; color: var(--admin-text); transition: color 0.25s ease; } .docs-feature:hover .docs-feature-title { color: hsl(var(--f-hue) 45% 92%); } .docs-feature-body { margin-top: 5px; font-size: 12px; line-height: 1.65; color: var(--admin-text-muted); } /* Owning module: the tile doubles as a map of the codebase. */ .docs-feature-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; letter-spacing: 0.04em; color: var(--admin-text-dim); } .docs-feature-dot { width: 4px; height: 4px; border-radius: 999px; background: var(--f-line); transition: background-color 0.25s ease, box-shadow 0.25s ease; } .docs-feature:hover .docs-feature-dot { background: var(--f-ink); box-shadow: 0 0 7px hsl(var(--f-hue) 85% 70% / 0.7); } /* Section heading aside: a quiet count chip next to "Section 08". */ .docs-count-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--admin-border); border-radius: 999px; background: rgba(255, 255, 255, 0.02); padding: 3px 10px; font-size: 10.5px; letter-spacing: 0.02em; color: var(--admin-text-dim); } .docs-count-chip b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--admin-text-muted); } .docs-count-sep { width: 1px; height: 9px; background: var(--admin-border); } /* Tile entrance: staggered once the grid scrolls into view. Shared by the feature grid and the provider grid. */ @keyframes docs-tile-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } } @media (prefers-reduced-motion: no-preference) { .docs-feature-grid.is-revealed .docs-feature { animation: docs-tile-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--f-i, 0) * 45ms); } } /* No hover pointer: keep the tints and spine at full strength so the grid still reads as colored rather than grey. */ @media (hover: none) { .docs-feature::before { opacity: 1; } .docs-feature .docs-spotlight, .docs-provider-item .docs-spotlight { opacity: 0.5; } } /* Inline code chips in docs prose (not inside
) */
.docs-content :not(pre) > code {
  padding: 0.12em 0.38em;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.85em;
  color: #bfdbfe;
}

/* Syntax highlighting tokens (dependency-free). Scoped to the two code
   surfaces that tokenize: the /docs reference block and the shared detail-page
   block. Token classes are the same in both — only the base text color differs. */
.docs-codeblock .tok-com,
.detail-code-text .tok-com {
  color: rgba(139, 148, 158, 0.8);
  font-style: italic;
}
.docs-codeblock .tok-str,
.detail-code-text .tok-str {
  color: #6ee7b7;
  opacity: 0.9;
}
.docs-codeblock .tok-kw,
.detail-code-text .tok-kw {
  color: #c4b5fd;
}
.docs-codeblock .tok-key,
.detail-code-text .tok-key {
  color: #7dd3fc;
}
.docs-codeblock .tok-var,
.detail-code-text .tok-var {
  color: #fcd34d;
}
.docs-codeblock .tok-flag,
.detail-code-text .tok-flag {
  color: #93c5fd;
  opacity: 0.85;
}
.docs-codeblock .tok-num,
.detail-code-text .tok-num {
  color: #fde68a;
}
.docs-codeblock .tok-bool,
.detail-code-text .tok-bool {
  color: #f9a8d4;
}
.docs-codeblock .tok-url,
.detail-code-text .tok-url {
  color: #67e8f9;
}

/* Next-section control: a quiet reading affordance under each heading. */
.docs-next {
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}
.docs-next:hover,
.docs-next:focus-visible {
  background: rgba(96, 165, 250, 0.06);
}

/* Endpoint path: the identifier readers copy, so it gets a surface of its own
   rather than sitting bare next to the method badge. */
.docs-endpoint-path {
  border-radius: 5px;
  transition: background-color 0.2s ease;
}
.group\/endpoint:hover .docs-endpoint-path {
  background: rgba(255, 255, 255, 0.03);
}

/* Method badge + endpoint chips */
.docs-method-badge {
  box-shadow: 0 0 16px -7px currentColor;
}
.docs-client-chip {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  padding: 2px 8px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--admin-text-dim);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.group\/endpoint:hover .docs-client-chip {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--admin-text-muted);
}
.docs-pathcopy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--admin-text-dim);
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.docs-pathcopy:hover {
  border-color: rgba(255, 255, 255, 0.14);
  color: #93c5fd;
}
.docs-pathcopy:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.45);
}
@media (min-width: 640px) {
  /* Client chips sit at the end of the row instead of drifting to the far
     right edge of a wide content column. */
  .docs-endpoint-clients {
    margin-left: 8px;
  }
}

/* Reading-progress hairline, pinned to the very top of the viewport */
.docs-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.docs-progress-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(var(--docs-progress, 0));
  transform-origin: left;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6 55%, #d946ef);
  transition: transform 0.12s linear;
}

/* Heading deep-link anchors: hover/focus-revealed, always visible to touch */
.docs-anchor {
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.docs-heading:hover .docs-anchor,
.docs-anchor:focus-visible {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .docs-anchor {
    opacity: 0.6;
    /* The # glyph alone is a ~17px target, well under the 44px touch floor.
       Grow the hit area to 44x44 and pull the vertical bleed back with a
       negative margin so the heading keeps its current height. */
    display: inline-flex;
    min-height: 44px;
    min-width: 44px;
    margin-block: -10px;
    align-items: center;
    justify-content: center;
  }
}

/* Selection themed to the docs world */
.docs-content ::selection,
.docs-masthead ::selection {
  background: rgba(96, 165, 250, 0.28);
  color: #fff;
}

/* Back-to-top control */
.docs-backtop {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9999px;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  color: var(--admin-text-muted);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.2s ease, border-color 0.2s ease;
}
.docs-backtop.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.docs-backtop:hover {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.35);
}
.docs-backtop:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

/* Hero action buttons stretch to the full measure on phones */
@media (max-width: 479px) {
  .docs-hero-actions > a,
  .docs-hero-actions > button,
  .docs-hero-actions > div {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* CTA: a borderless closing section, like the landing page's. */
.docs-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.docs-cta::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--admin-border) 20%,
    var(--admin-border) 80%,
    transparent
  );
}
.docs-cta-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--admin-text);
  text-wrap: balance;
}
.docs-cta-body {
  max-width: 44ch;
  margin: 1rem auto 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--admin-text-muted);
}
.docs-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 2rem;
}
@media (max-width: 479px) {
  .docs-cta-actions > a {
    width: 100%;
  }
}

/* ─── Login page: split-panel beam console ───────────────────────────────── */

/* Single-screen fit. The page must fill exactly one viewport with no
   scrolling, so every vertical measurement is a clamp() against viewport
   *height*: type, block spacing and node sizes shrink together on short
   screens and grow on tall ones. The showcase diagram is the only flexible
   child — it absorbs whatever the header block leaves over. */
.lg-root {
  --lg-bg: #000000;
  --lg-pad-y: clamp(14px, 2.6vh, 40px);
  --lg-title: clamp(21px, 3.2vh, 30px);
  --lg-body: clamp(11.5px, 1.5vh, 13.5px);
  --lg-block: clamp(12px, 2vh, 28px);
  --lg-gap: clamp(10px, 1.5vh, 16px);
  --lg-card-y: clamp(12px, 1.9vh, 20px);
  --lg-node: clamp(42px, 6vh, 54px);
  --lg-hub: clamp(58px, 8.4vh, 76px);
  --lg-control-h: clamp(38px, 5.2vh, 44px);
}

/* Hero-style lighting: long rotated radial "streaks" of near-white light,
   screened over pure black. These are the signature of the hero backdrop, so
   the login reads as part of the same family. Mix-blend-screen keeps them
   luminous without washing the black. */
.lg-streak-1 {
  position: absolute;
  left: 0;
  top: 0;
  width: 560px;
  height: 1280px;
  transform: rotate(-45deg) translateY(-350px);
  border-radius: 9999px;
  background: radial-gradient(
    68.54% 68.72% at 55.02% 31.46%,
    hsla(0, 0%, 85%, 0.09) 0,
    hsla(0, 0%, 55%, 0.02) 50%,
    hsla(0, 0%, 45%, 0) 80%
  );
}
.lg-streak-2 {
  position: absolute;
  left: 0;
  top: 0;
  width: 224px;
  height: 1280px;
  border-radius: 9999px;
  background: radial-gradient(
    50% 50% at 50% 50%,
    hsla(0, 0%, 85%, 0.07) 0,
    hsla(0, 0%, 45%, 0.02) 80%,
    transparent 100%
  );
  transform: rotate(-45deg) translate(5%, -50%);
}
.lg-streaks {
  mix-blend-screen: opacity(0.5);
}

/* Bottom-anchored vignette — identical to the hero's, but keyed to the login's
   pure black so the edges fall off to nothing. */
.lg-vignette {
  background: radial-gradient(125% 125% at 50% 100%, transparent 0%, var(--lg-bg) 75%);
}

/* In-card diagram (below lg) — only when the viewport is tall enough to hold
   the card *and* a 300px graph without scrolling. */
.lg-showcase-sm {
  display: block;
}
@media (min-width: 1024px) {
  .lg-showcase-sm {
    display: none;
  }
}
@media (max-height: 899px) {
  .lg-showcase-sm {
    display: none;
  }
}

/* Masked grid wash for the showcase panel */
.lg-beam-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 0%, transparent 80%);
}

/* Slow conic bloom rotating behind the hub node */
@keyframes lg-bloom {
  to {
    transform: rotate(360deg);
  }
}
.lg-bloom {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(59, 130, 246, 0.16) 55deg,
    rgba(168, 85, 247, 0.14) 110deg,
    transparent 175deg,
    transparent 360deg
  );
}
@media (prefers-reduced-motion: no-preference) {
  .lg-bloom {
    animation: lg-bloom 14s linear infinite;
  }
}

/* Hub breathing ring */
@keyframes lg-hub-ring {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.09);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .lg-hub-ring {
    animation: lg-hub-ring 3.2s ease-in-out infinite;
  }
}

/* Provider node idle breathing */
@keyframes lg-node-breathe {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .lg-node-breathe {
    animation: lg-node-breathe 4s ease-in-out infinite;
  }
}

/* Panel entrance */
@keyframes lg-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
@keyframes lg-slide-left {
  from {
    opacity: 0;
    transform: translateX(-22px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .lg-rise {
    animation: lg-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .lg-slide-left {
    animation: lg-slide-left 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

/* Vertical hairline divider between the two panels */
.lg-divider {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(59, 130, 246, 0.14) 22%,
    rgba(168, 85, 247, 0.12) 55%,
    transparent 100%
  );
}

/* Corner brackets on the showcase panel */
.lg-corner {
  position: absolute;
  height: 26px;
  width: 26px;
  border-color: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.lg-corner-tl {
  top: 0;
  left: 0;
  border-top-width: 1px;
  border-left-width: 1px;
}
.lg-corner-br {
  bottom: 0;
  right: 0;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

/* Form panel: soft light that follows the cursor (--mx / --my fed from JS) */
.lg-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(59, 130, 246, 0.07),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.lg-spotlight:hover::before {
  opacity: 1;
}

/* Segmented mode toggle: sliding indicator */
.lg-seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}
.lg-seg-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  /* one grid column: (100% - 2*3px padding - 2px gap) / 2 */
  width: calc(50% - 4px);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.16);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Input wrapper glow that lights up with the field */
.lg-field {
  position: relative;
  border-radius: var(--admin-radius-sm);
  transition: box-shadow 0.25s ease;
}
.lg-field:focus-within {
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 0 24px -6px rgba(59, 130, 246, 0.35);
}

/* Vertical shrink path for short viewports (≈ ≤700px tall): the showcase hides
   entirely and the card is allowed to scroll *inside* itself with the submit
   button pinned, so the page itself still never scrolls. */
.lg-card-body {
  overflow-y: auto;
  max-height: 100%;
}
.lg-card-footer {
  flex-shrink: 0;
}

/* ─── Landing page: AnimatedGroup + MarqueeContainer keyframes ──────────── */

@media (prefers-reduced-motion: no-preference) {
  @keyframes wiwi-ag-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes wiwi-ag-slide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes wiwi-ag-scale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
  }
  @keyframes wiwi-ag-blur {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
  }
  @keyframes wiwi-ag-blur-slide {
    from { opacity: 0; filter: blur(4px); transform: translateY(20px); }
    to { opacity: 1; filter: blur(0); transform: translateY(0); }
  }
  @keyframes wiwi-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - var(--gap, 24px))); }
  }
}
.animate-marquee {
  animation: wiwi-marquee var(--duration, 40s) linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .animate-marquee { animation: none; }
}

/* ─── Hero entrance + scroll-reveal (from llmgateway-ref globals.css) ───── */

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .animate-hero-enter {
    animation: hero-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero-enter-delay-1 { animation-delay: 0.15s; }
  .hero-enter-delay-2 { animation-delay: 0.3s; }
  .hero-enter-delay-3 { animation-delay: 0.45s; }
}

@media (prefers-reduced-motion: reduce) {
  .animate-hero-enter { animation: none; }
}

/* ─── Hero visual enhancements ───────────────────────────────────────────── */

/* Slow-drifting aurora orbs behind the hero */
@keyframes hero-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-25px, 25px) scale(0.95); }
}
@keyframes hero-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.12); }
}
@keyframes hero-orb-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(35px, 35px) scale(1.1); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-orb-1 { animation: hero-orb-1 18s ease-in-out infinite; }
  .hero-orb-2 { animation: hero-orb-2 22s ease-in-out infinite; }
  .hero-orb-3 { animation: hero-orb-3 26s ease-in-out infinite; }
}

/* Gradient text shimmer on the headline accent */
@keyframes hero-gradient-pan {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.hero-gradient-text {
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #a78bfa, #f472b6, #a78bfa, #60a5fa, #22d3ee);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-gradient-text {
    animation: hero-gradient-pan 6s linear infinite;
  }
}

/* Pulsing "live" dot for the hero badge */
@keyframes hero-live-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}
.hero-live-dot {
  position: relative;
  display: inline-flex;
  height: 7px;
  width: 7px;
}
.hero-live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: currentColor;
}
.hero-live-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-live-dot::before {
    animation: hero-live-pulse 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }
}

/* Subtle conic glow ring around the primary CTA */
@keyframes cta-ring-spin {
  to { transform: rotate(360deg); }
}
.hero-cta-ring {
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(59, 130, 246, 0.5) 60deg,
    rgba(168, 85, 247, 0.5) 120deg,
    transparent 180deg,
    transparent 360deg
  );
  opacity: 0.6;
  filter: blur(6px);
  z-index: -1;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-cta-ring { animation: cta-ring-spin 4s linear infinite; }
}

/* Animated grid pan for the hero backdrop */
@keyframes hero-grid-pan {
  0% { background-position: 0 0; }
  100% { background-position: 64px 64px; }
}
.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-grid { animation: hero-grid-pan 24s linear infinite; }
}


@keyframes scroll-reveal-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    @supports (animation-timeline: view()) {
      animation: scroll-reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 28%;
    }
  }
}

/* ─── Shimmer button (from llmgateway-ref ShimmerButton) ────────────────── */

@keyframes shimmer-slide {
  to { transform: translate(calc(100cqw - 100%), 0); }
}

@keyframes spin-around {
  0% { transform: translateZ(0) rotate(0); }
  15%, 35% { transform: translateZ(0) rotate(90deg); }
  65%, 85% { transform: translateZ(0) rotate(270deg); }
  100% { transform: translateZ(0) rotate(360deg); }
}

.lg-shimmer-button {
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
}
.lg-shimmer-button .shimmer-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}
.lg-shimmer-button .shimmer {
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 15%,
    transparent 30%,
    transparent 50%,
    rgba(255, 255, 255, 0.4) 65%,
    transparent 80%
  );
  animation: spin-around 4s linear infinite;
}
.lg-shimmer-button .shimmer::before,
.lg-shimmer-button .shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 15%,
    transparent 30%,
    transparent 50%,
    rgba(255, 255, 255, 0.4) 65%,
    transparent 80%
  );
  animation: shimmer-slide 3s ease-in-out infinite alternate;
}
.lg-shimmer-button .shimmer::after {
  animation-direction: alternate-reverse;
}

@media (prefers-reduced-motion: reduce) {
  .lg-shimmer-button .shimmer,
  .lg-shimmer-button .shimmer::before,
  .lg-shimmer-button .shimmer::after {
    animation: none;
  }
}

/* ─── Accordion (from llmgateway-ref) ────────────────────────────────────── */

@keyframes accordion-down {
  from { height: 0; }
  to { height: var(--radix-accordion-content-height); }
}

@keyframes accordion-up {
  from { height: var(--radix-accordion-content-height); }
  to { height: 0; }
}

.animate-accordion-down {
  animation: accordion-down 0.2s ease-out;
}

.animate-accordion-up {
  animation: accordion-up 0.2s ease-out;
}

/* ─── Noise texture utility (from llmgateway-ref bg-noise) ───────────────── */

.bg-noise::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
}

/* ─── Marquee reverse direction ─────────────────────────────────────────── */

@keyframes wiwi-marquee-reverse {
  from { transform: translateX(calc(-100% - var(--gap, 24px))); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .animate-marquee-reverse {
    animation: wiwi-marquee-reverse var(--duration, 40s) linear infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-marquee-reverse { animation: none; }
}

/* ─── Playground chat ───────────────────────────────────────────────────── */

/* Message enter animation */
@keyframes pg-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .pg-msg-enter { animation: pg-msg-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both; }
}

/* Suggestion card enter stagger */
@keyframes pg-sugg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .pg-sugg-enter { animation: pg-sugg-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
}

/* Streaming caret blink */
@keyframes pg-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.pg-caret::after {
  content: "▍";
  margin-left: 1px;
  animation: pg-caret 1s step-end infinite;
  color: var(--admin-accent, #3b82f6);
}
@media (prefers-reduced-motion: reduce) {
  .pg-caret::after { content: none; }
}

/* Typing loader — three quiet, eased dots */
.pg-typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--admin-text-muted, #9ca3af);
}
@keyframes pg-typing-pulse {
  0%, 60%, 100% { transform: scale(0.9); opacity: 0.4; }
  30% { transform: scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .pg-typing-dot { animation: pg-typing-pulse 1.2s ease-in-out infinite; }
  .pg-typing-dot:nth-child(2) { animation-delay: 0.15s; }
  .pg-typing-dot:nth-child(3) { animation-delay: 0.3s; }
}

/* Composer auto-grow textarea — hide native resize, match surface.
   `field-sizing: content` does the growing on Chromium; the JS fallback in
   Playground.tsx covers Firefox/Safari where it is unsupported. */
.pg-textarea {
  resize: none;
  field-sizing: content;
  min-height: 24px;
  max-height: 200px;
}
/* JS fallback (applies everywhere; identical to field-sizing where both run):
   shrink first so the measured scrollHeight is the true content height, then
   grow up to max-height, at which point the element scrolls internally. */
.pg-textarea[data-autogrow] {
  height: 24px;
  overflow-y: auto;
}

/* Scroll-to-bottom fade */
.pg-scroll-fade {
  mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent 100%);
}

/* ── Playground sidebar ───────────────────────────────────────────────────── */

.pg-sidebar {
  width: 260px;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
  overflow: hidden;
}
.pg-sidebar[data-collapsed="true"] {
  width: 0;
  opacity: 0;
}

.pg-chat-item {
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.pg-chat-item:hover {
  background: rgba(255, 255, 255, 0.025);
}
.pg-chat-item[data-active="true"] {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

@keyframes pg-sidebar-enter {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .pg-sidebar-enter { animation: pg-sidebar-enter 0.2s ease both; }
}

/* ── Playground: avatars & bubbles ────────────────────────────────────────── */

.pg-user-bubble {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-700));
}
.pg-avatar-user {
  background: linear-gradient(135deg, var(--color-brand-400), var(--color-brand-600));
  box-shadow: 0 2px 10px rgba(116, 66, 237, 0.35);
}
.pg-avatar-assistant {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.pg-hero-badge {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-700));
}
/* A slow, quiet halo behind the hero badge — reinforces the brand pool
   without competing with the prompt grid. Fully disabled under reduced
   motion. */
.pg-hero-badge::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 28px;
  background: radial-gradient(55% 55% at 50% 50%, rgba(124, 58, 237, 0.28), transparent 72%);
  z-index: -1;
  animation: pg-halo 3.6s ease-in-out infinite;
}
@keyframes pg-halo {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .pg-hero-badge::before { animation: none; opacity: 0.7; }
}

/* Response stats enter */
@keyframes pg-stats-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .pg-stats-enter { animation: pg-stats-in 0.3s ease both; }
}

/* Keyboard hint chips */
.pg-kbd {
  display: inline-block;
  border: 1px solid var(--admin-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--admin-surface-elevated);
  padding: 0 5px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  line-height: 16px;
  color: var(--admin-text-muted);
}

/* ── Playground: markdown ─────────────────────────────────────────────────── */

.pg-md {
  word-break: break-word;
}
.pg-md > *:first-child { margin-top: 0; }
.pg-md > *:last-child { margin-bottom: 0; }
.pg-md-p {
  margin: 0.55em 0;
  line-height: 1.65;
}
.pg-md-h {
  font-weight: 600;
  color: var(--admin-text);
  line-height: 1.35;
  margin: 1em 0 0.4em;
}
.pg-md-h1 { font-size: 17px; }
.pg-md-h2 { font-size: 15.5px; }
.pg-md-h3 { font-size: 14.5px; }
.pg-md-h4 { font-size: 14px; }
.pg-md-ul,
.pg-md-ol {
  margin: 0.5em 0;
  padding-left: 1.4em;
  line-height: 1.65;
}
.pg-md-ul { list-style: disc; }
.pg-md-ol { list-style: decimal; }
.pg-md-ul li::marker { color: var(--admin-text-dim); }
.pg-md-ol li::marker { color: var(--admin-text-dim); font-size: 0.85em; }
.pg-md-ul li,
.pg-md-ol li { margin: 0.2em 0; }
.pg-md-ul-nested,
.pg-md-ol-nested { margin: 0.15em 0; }
.pg-md-quote {
  margin: 0.6em 0;
  padding: 0.15em 0 0.15em 0.9em;
  border-left: 2px solid var(--color-brand-500);
  color: var(--admin-text-muted);
}
.pg-md-quote-p { margin: 0.2em 0; }
.pg-md-hr {
  border: none;
  border-top: 1px solid var(--admin-border);
  margin: 0.9em 0;
}
.pg-md-link {
  color: var(--color-brand-300);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(185, 168, 253, 0.4);
  transition: color 0.12s ease;
}
.pg-md-link:hover { color: var(--color-brand-200); }
.pg-md-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--admin-border);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  color: var(--color-brand-200);
}
.pg-md-caret {
  display: inline-block;
  margin-left: 1px;
}

/* Code blocks */
.pg-code {
  margin: 0.7em 0;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #070709;
  overflow: hidden;
}
.pg-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  border-bottom: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.02);
}
.pg-code-lang {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-text-dim);
}
.pg-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10.5px;
  color: var(--admin-text-dim);
  transition: color 0.12s ease, background-color 0.12s ease;
}
.pg-code-copy:hover {
  color: var(--admin-text);
  background: rgba(255, 255, 255, 0.05);
}
.pg-code-pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.6;
}
.pg-code-pre code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #d4d4d8;
  white-space: pre;
}

/* Tables */
.pg-md-tablewrap {
  margin: 0.7em 0;
  overflow-x: auto;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
}
.pg-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pg-md-table th {
  text-align: left;
  font-weight: 600;
  color: var(--admin-text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 12px;
  border-bottom: 1px solid var(--admin-border);
  white-space: nowrap;
}
.pg-md-table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--admin-text);
}
.pg-md-table tr:last-child td { border-bottom: none; }
.pg-md-table tbody tr {
  transition: background-color 0.1s ease;
}
.pg-md-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* ── Playground: visual polish ────────────────────────────────────────────── */

/* Hero headline keeps its emphasis in type weight and color, not a
   decorative text gradient. */
.pg-hero-title {
  color: var(--admin-text);
  text-wrap: balance;
}

/* Thin, quiet scrollbars inside the playground */
.pg-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.pg-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.pg-scroll::-webkit-scrollbar-track { background: transparent; }
.pg-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
.pg-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* Active chat item: brand accent bar on the left edge */
.pg-chat-item { position: relative; }
.pg-chat-item[data-active="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-brand-400), var(--color-brand-600));
}

/* User bubble: inner top highlight + brand-tinted drop shadow. Owns the
   element's box-shadow entirely — the TSX must not also apply a Tailwind
   shadow utility or it will override this. */
.pg-user-bubble {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 24px -10px rgba(99, 51, 209, 0.5);
}

/* Composer: crisp focus state without a colored halo. (Base surfaces for
   .pg-composer live in the workbench-refinement block below; this block is
   the transition + focus treatment from the earlier polish pass.) */
.pg-composer {
  transition: border-color 0.15s ease, background-color 0.2s ease;
}
.pg-composer:focus-within {
  border-color: rgba(129, 140, 248, 0.42);
  background: linear-gradient(180deg, rgba(28, 28, 34, 0.98), rgba(17, 17, 21, 0.99));
  /* One hairline in the shared accent, outside the border so it never
     fights the elevated background. */
  outline: 1px solid rgba(129, 140, 248, 0.22);
  outline-offset: 2px;
}

/* Scroll-to-bottom button: gentle float-in */
@keyframes pg-float-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .pg-scroll-btn { animation: pg-float-in 0.2s ease both; }
}
.pg-scroll-btn { box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.55); }

/* ── Playground workbench refinement ──────────────────────────────────────── */

/* The workbench borrows the public site's beam language, but keeps the
   treatment quiet enough for a task surface. */
.pg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.pg-workbench-beams {
  top: 0;
  bottom: auto;
  height: 58%;
  opacity: 0.16;
  transform: none;
  transform-origin: center;
  mix-blend-mode: screen;
  filter: saturate(0.8);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.82) 54%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.82) 54%, transparent 100%);
}

.pg-topbar {
  background: rgba(5, 5, 5, 0.84);
}
.pg-brand {
  min-height: 44px;
}
.pg-brand-mark {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.2), rgba(124, 58, 237, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.pg-model-trigger {
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.pg-model-menu {
  box-shadow: 0 22px 60px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.pg-rail {
  width: 52px;
  background: rgba(9, 9, 11, 0.92);
}
/* Tap-outside scrim for the mobile history overlay. */
.pg-scrim {
  animation: pg-scrim-in 0.18s ease both;
}
@keyframes pg-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pg-icon-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.pg-sidebar {
  width: 272px;
  background: rgba(9, 9, 11, 0.88);
}
.pg-sidebar-header {
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}
.pg-new-chat {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.pg-chat-item {
  min-height: 56px;
}
.pg-chat-item:hover {
  background: rgba(255, 255, 255, 0.035);
}
.pg-chat-item[data-active="true"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
.pg-chat-item[data-active="true"] .pg-chat-item-icon {
  color: var(--admin-text-muted);
  background: rgba(255, 255, 255, 0.06);
}
.pg-chat-item[data-active="true"]::before {
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.pg-body {
  min-width: 0;
}
.pg-arena {
  isolation: isolate;
  /* Two stacked washes: a faint top light from the beam layer, and a soft
     violet pool seated behind the composer so the message column does not sit
     on flat black. */
  background:
    radial-gradient(120% 60% at 50% 118%, rgba(99, 102, 241, 0.11), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 30%);
}
.pg-context-bar {
  position: relative;
  z-index: 1;
}
.pg-context-bar::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
}
/* Scroll-to-bottom fade — used as the message list's top mask: content
   dissolving under the context bar reads as "more above" without a hard
   clipping edge. The mask is paint-only (no extra element, no blend mode —
   deliberately cheap after the #518 compositing lesson). */
.pg-scroll-fade {
  mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent 100%);
}
.pg-message-scroll {
  position: relative;
  z-index: 1;
  /* Inverted fade at the top edge only; 28px is enough to soften the cut
     without dimming the first message's heading. */
  mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
}
.pg-message-column {
  position: relative;
}
.pg-message {
  position: relative;
}
.pg-message-assistant {
  border-top: 1px solid rgba(255, 255, 255, 0.035);
  padding-top: 18px;
}
.pg-message-assistant:first-child {
  border-top: 0;
  padding-top: 0;
}
.pg-message-heading {
  min-height: 18px;
}
.pg-message-role {
  letter-spacing: 0.12em;
}
.pg-response {
  min-width: 0;
}

/* Reasoning trace — a quiet, secondary surface above the answer. Collapsed by
   default once the answer exists; open while it is the only sign of progress. */
.pg-reasoning {
  border: 1px solid var(--admin-border);
  border-left: 2px solid color-mix(in srgb, var(--admin-accent, #3b82f6) 55%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--admin-surface-elevated) 65%, transparent);
  font-size: 12.5px;
}
.pg-reasoning[data-live="true"] {
  border-left-color: var(--admin-accent, #3b82f6);
}
.pg-reasoning-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  /* 44px minimum tap target (UI rule) without a visually heavy row. */
  min-height: 44px;
  padding: 0 10px;
  cursor: pointer;
  list-style: none;
  color: var(--admin-text-dim);
  user-select: none;
}
.pg-reasoning-summary::-webkit-details-marker { display: none; }
.pg-reasoning-summary:hover { color: var(--admin-text-muted); }
.pg-reasoning-summary:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--admin-accent, #3b82f6) 60%, transparent);
  border-radius: 10px;
}
.pg-reasoning-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pg-reasoning-body {
  max-height: min(38vh, 320px);
  overflow-y: auto;
  padding: 0 10px 10px;
}
.pg-reasoning-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--admin-text-muted);
}
.pg-msg-failed {
  line-height: 1.5;
}
.pg-message-actions {
  min-height: 28px;
}
.pg-user-bubble {
  background: linear-gradient(135deg, rgba(109, 76, 224, 0.92), rgba(79, 70, 229, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 28px -16px rgba(76, 29, 149, 0.85);
}
.pg-avatar-user {
  background: linear-gradient(145deg, #8b5cf6, #4f46e5);
  box-shadow: 0 4px 16px -8px rgba(99, 102, 241, 0.8);
}
.pg-avatar-assistant {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.15), rgba(30, 41, 59, 0.7));
}

.pg-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Live-region wrapper: visually inert, keeps role=status off the pill's own
   box so the compact (label-hidden) form doesn't double-announce geometry.
   pointer-events: none — the wrapper is never interactive, and the compact
   pill beneath the top bar's right cluster would otherwise hit-test over
   the sidebar drawer's collapse button. */
.pg-status-wrap {
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}
.pg-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 9999px;
  background: currentColor;
}
.pg-status-ready {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.16);
  background: rgba(34, 197, 94, 0.07);
}
.pg-status-live {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.2);
  background: rgba(99, 102, 241, 0.1);
}
.pg-status-live .pg-status-dot {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  animation: pg-status-pulse 1.6s ease-in-out infinite;
}
/* Loading / warning tones are kept for future states (e.g. reconnect);
   currently unused but part of the pill's visual vocabulary. */
.pg-status-loading {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(59, 130, 246, 0.07);
}
.pg-status-loading .pg-status-dot {
  animation: pg-status-pulse 1.2s ease-in-out infinite;
}
.pg-status-warning {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.18);
  background: rgba(245, 158, 11, 0.08);
}
.pg-status-compact {
  border-color: transparent;
  background: transparent;
  padding-inline: 4px;
}
/* Compact form below sm is dot-only (6px + padding = ~16px wide). The pill
   is decorative status chrome, but it still hit-tests over the sidebar's
   collapse button in the drawer (header z-30 over sidebar z-30, later
   paint wins), so take it out of pointer events on the narrow form — the
   live region text still reads to assistive tech. */
@media (max-width: 639px) {
  .pg-status-compact {
    pointer-events: none;
  }
}
.pg-status-compact .pg-status-label {
  display: none;
}
@media (min-width: 640px) {
  .pg-status-compact {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
  }
  .pg-status-compact .pg-status-label {
    display: inline;
  }
}
@keyframes pg-status-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .pg-status-live .pg-status-dot,
  .pg-status-loading .pg-status-dot { animation: none; }
}

.pg-key-notice {
  color: #fbbf24;
}
.pg-dashboard-link {
  min-height: 44px;
}
.pg-dashboard-link:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.pg-metrics {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}
.pg-metrics-label {
  color: var(--admin-text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* Each stat is its own tile so six numbers read as six facts instead of one
   undifferentiated run of monospace. */
.pg-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.022);
  white-space: nowrap;
}
.pg-metric-tone-blue { color: #bfdbfe; border-color: rgba(96, 165, 250, 0.18); background: rgba(59, 130, 246, 0.07); }
.pg-metric-tone-violet { color: #ddd6fe; border-color: rgba(167, 139, 250, 0.18); background: rgba(139, 92, 246, 0.07); }
.pg-metric-tone-emerald { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.18); background: rgba(16, 185, 129, 0.07); }
.pg-metric-tone-neutral { color: var(--admin-text-muted); }
.pg-metric-estimated {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(245, 158, 11, 0.08);
}
.pg-metric-label {
  color: rgba(255, 255, 255, 0.45);
}
.pg-metrics-loading {
  color: var(--admin-text-muted);
  animation: pg-status-pulse 1.3s ease-in-out infinite;
}

.pg-composer-region {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.24), rgba(5, 5, 5, 0.96) 30%);
}
.pg-composer {
  background: linear-gradient(180deg, rgba(24, 24, 29, 0.96), rgba(15, 15, 19, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 16px 40px -24px rgba(0, 0, 0, 0.95);
  position: relative;
}
.pg-composer:focus-within {
  border-color: rgba(129, 140, 248, 0.42);
  background: linear-gradient(180deg, rgba(28, 28, 34, 0.98), rgba(17, 17, 21, 0.99));
}
.pg-send-button {
  background: linear-gradient(145deg, #8b5cf6, #4f46e5);
  box-shadow: 0 8px 22px -12px rgba(99, 102, 241, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.pg-send-button:disabled {
  box-shadow: none;
}
.pg-stop-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.pg-composer-hints {
  min-height: 18px;
}

/* A tiny live marker beside the Assistant label on the turn that is still
   streaming — signals "this turn is still writing" without adding a second
   copy of the top bar's status pill. Reuses the app's pulse keyframes and
   goes static under reduced motion. */
.pg-live-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 9999px;
  background: var(--color-brand-400);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
@media (prefers-reduced-motion: no-preference) {
  .pg-live-dot { animation: pg-status-pulse 1.6s ease-in-out infinite; }
}

.pg-hero-shell {
  isolation: isolate;
}
.pg-model-card {
  border: 1px solid rgba(129, 140, 248, 0.16);
  background: rgba(99, 102, 241, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.pg-model-card-icon {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.pg-ready-pill {
  color: #86efac;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.14);
}
.pg-hero-tabs {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
/* The category row scrolls horizontally instead of clipping or wrapping at
   narrow widths, and keeps its own scrollbar out of the layout. */
.pg-hero-tabs-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.pg-hero-tabs-scroll::-webkit-scrollbar { display: none; }
.pg-hero-tabs-scroll > * { scroll-snap-align: center; }
.pg-suggestion-card {
  min-height: 58px;
}

@media (max-width: 767px) {
  /* On mobile the sidebar is a fixed overlay, so its width is capped against
     the viewport rather than the flex row, and it gets its own elevation. */
  .pg-sidebar {
    width: min(300px, calc(100vw - 56px));
  }
  .pg-context-bar {
    padding-top: 10px;
  }
  .pg-context-bar::after {
    margin-top: 10px;
  }
  .pg-workbench-beams {
    height: 48%;
    opacity: 0.1;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.72) 52%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.72) 52%, transparent 100%);
  }
  .pg-metrics {
    align-items: flex-start;
  }
  .pg-metrics-items {
    gap: 5px;
  }
  .pg-metric {
    padding: 2px 6px;
  }
  .pg-composer-region {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .pg-hero-title {
    font-size: 26px;
  }
  .pg-hero-shell {
    align-items: flex-start;
  }
  .pg-hero-shell .animate-hero-enter {
    margin-top: 4px;
  }
}

@media (max-height: 760px) and (min-width: 768px) {
  .pg-hero-shell {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-workbench-beams {
    display: none;
  }
}

/* ── Reliability page: failover diagram + uptime timeline ────────────────── */

/* Flowing packets along the request path: a dot travels the connector line. */
@keyframes rel-packet {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
/* Failed attempt: travels partway toward the down provider, then peters out. */
@keyframes rel-packet-fail {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  55% { offset-distance: 60%; opacity: 1; }
  100% { offset-distance: 78%; opacity: 0; }
}

/* Down-provider connector: a dashed line steadily "flaring" red. */
@keyframes rel-down-flare {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

/* Healthy-provider success ping: ring expands outward from the node. */
@keyframes rel-success-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Gateway hub breathing glow. */
@keyframes rel-hub-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

/* Hub shield sweep — a faint highlight rotating around the hub. */
@keyframes rel-shield-sweep {
  to { transform: rotate(360deg); }
}

/* Uptime timeline left-to-right reveal wipe. */
@keyframes rel-uptime-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* Status bar segment blink for the "incident" ticks. */
@keyframes rel-incident-blink {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.4; }
}

@media (prefers-reduced-motion: no-preference) {
  .rel-down-flare { animation: rel-down-flare 1.4s ease-in-out infinite; }
  .rel-success-ring { animation: rel-success-ring 2.2s ease-out infinite; }
  .rel-hub-glow { animation: rel-hub-glow 3.4s ease-in-out infinite; }
  .rel-shield-sweep { animation: rel-shield-sweep 8s linear infinite; }
  .rel-uptime-reveal { animation: rel-uptime-reveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .rel-incident-blink { animation: rel-incident-blink 1.6s ease-in-out infinite; }
  .rel-packet-ok { animation: rel-packet 2.4s linear infinite; }
  .rel-packet-fail { animation: rel-packet-fail 2.4s linear infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .rel-down-flare,
  .rel-success-ring,
  .rel-hub-glow,
  .rel-shield-sweep,
  .rel-uptime-reveal,
  .rel-incident-blink,
  .rel-packet-ok,
  .rel-packet-fail {
    animation: none;
  }
}

/* ── How It Works (GraphSection) ───────────────────────────────────────── */
@keyframes wiwi-gateway-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(141, 127, 250, 0.45), 0 0 28px 4px rgba(141, 127, 250, 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(141, 127, 250, 0), 0 0 44px 10px rgba(141, 127, 250, 0.55); }
}
@keyframes wiwi-orbit {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .wiwi-gateway-node { animation: wiwi-gateway-pulse 3.5s ease-in-out infinite; }
}

/* ── Full-bleed breakout ────────────────────────────────────────────────────
   Breaks a child out of a centered max-width + padding wrapper so it spans
   the full viewport width. Used by the Landing hero to go edge-to-edge. */
.full-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ─── Models: the routing ledger ───────────────────────────────────────────
   The Models page is a switchboard, not a gallery. A model group is a signal
   source; its deployments are where that signal is split. So the page is one
   continuous ruled table — group header rows, indented deployment rows
   beneath — rather than a stack of identical rounded cards. Rules carry the
   hierarchy (a rule means "a new group starts here"), and the only rounded
   thing on the page is the one control that needs it.

   Naming: `wl-` = wiwi ledger. */

.wl-shell {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--admin-surface);
  overflow: hidden;
}

/* Column header. Uppercase micro-labels are the house chrome, but they
   belong to the columns here — not scattered above every value the way the
   card version put them. Metric columns opt out: "P95" shouted is a typo
   wearing a hat, not a label. */
.wl-head th {
  padding: 10px 16px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--admin-text-dim);
  text-align: left;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.012);
  border-bottom: 1px solid var(--admin-border);
}
.wl-head th.wl-plain {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 10.5px;
}
/* The header rule sets `text-align: left` on every column, and a class
   selector like `.text-right` cannot out-specify it — so a right-aligned
   header has to be re-asserted here, or the label drifts away from the
   numbers it names. */
.wl-head th.wl-right {
  text-align: right;
}

/* A group header: the source of the signal. Set apart by weight and by the
   rule above it, not by a card, a shadow, or a gradient. */
.wl-group {
  border-top: 1px solid var(--admin-border);
}
.wl-group:first-child {
  border-top: 0;
}
.wl-group td {
  padding: 13px 16px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.022);
}

/* The group's name is the subject of the page: the one place a large,
   confident face is set in the sans, everything else recedes. */
.wl-group-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--admin-text);
  line-height: 1.2;
}

/* A deployment row: an indented child of the group above it. */
.wl-dep td {
  padding: 9px 16px;
  vertical-align: middle;
  border-top: 1px solid rgba(255, 255, 255, 0.035);
}
.wl-dep:hover td {
  background: rgba(255, 255, 255, 0.016);
}

/* Indentation replaces a nested card: the tree structure is drawn by
   position and a hairline, not by another box. */
.wl-indent {
  border-left: 1px solid var(--admin-border);
  margin-left: 3px;
  padding-left: 14px;
}

/* The split bar: where this group's traffic actually goes. This is the
   subject of the page, so it is drawn as a real bar with a measured scale
   rather than as a decorative strip. */
.wl-split {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}
.wl-split > span {
  display: block;
  height: 100%;
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Provider identity: the one place colour is spent, and it is spent only
   here. A provider keeps its hue everywhere it appears. */
.wl-hue {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

/* Weight editor: the only rounded control on the page, because it is the
   only one you touch. */
.wl-weight {
  width: 4.5rem;
}

/* Status text, not a status pill. A pill per row is a wall of chips; a word
   in the state colour reads faster and costs no chrome. */
.wl-state {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Meta under a group name: aliases and counts, in the sans at low
   contrast. Never a middot-joined string of unrelated facts. */
.wl-meta {
  font-size: 11.5px;
  color: var(--admin-text-dim);
  line-height: 1.5;
}

/* Numeric columns share one right edge. */
.wl-num {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

/* Filter rail: a row of quiet text choices, not a segmented control with
   filled pills. The active one is marked by an underline, which is a
   typographic decision, not a chip. The 44px min-height keeps the targets
   tappable — the underline is the active marker, not the hit area. */
.wl-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 2px 9px;
  color: var(--admin-text-dim);
  font-size: 12.5px;
  transition: color 0.15s ease;
}
.wl-filter:hover {
  color: var(--admin-text-muted);
}
.wl-filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: transparent;
  transition: background 0.15s ease;
}
.wl-filter[aria-pressed="true"] {
  color: var(--admin-text);
}
.wl-filter[aria-pressed="true"]::after {
  background: var(--admin-accent);
}

/* The page's one moment of motion: the split bars settle when the routing
   changes. Reduced motion turns the transition off, so the bar still lands
   on the right width — it just arrives without sliding. */
@media (prefers-reduced-motion: reduce) {
  .wl-split > span {
    transition: none;
  }
}

/* The inline metric copy, used only below md where the table's own p95 /
   in-flight columns are dropped. */
.wl-m-inline {
  display: none;
}

/* Below md the ledger stops being a table. Five columns cannot fit a
   phone, and a table that scrolls sideways hides the data the operator
   came for. So below md the p95 / in-flight columns are dropped and
   their values ride inline with the route, and the weight editor moves
   to the end of the route line.

   The weight editor is the ONE editor in the page, not a second copy
   rendered for the narrow layout: two editors for one value meant two
   independent debounce timers, and the server refetch (every 10s) fed
   each of them a different server value, so the two fought and the
   weight flip-flopped between what was typed and what was stored. */
@media (max-width: 767px) {
  .wl-table thead {
    display: none;
  }
  .wl-table,
  .wl-table tbody {
    display: block;
    width: 100%;
  }
  .wl-table tr {
    display: block;
  }
  .wl-table td {
    display: block;
    min-width: 0;
  }
  /* The p95 / in-flight cells are replaced by the inline copy in the
     route cell, so the table's own cells are not rendered. */
  .wl-dep td.wl-metric {
    display: none;
  }
  .wl-m-inline {
    display: inline-flex;
    gap: 12px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--admin-text-dim);
  }
  /* The route and the weight editor share line one. The editor is
     positioned against the ROW (not the route cell): the route cell is
     `display:block` and its own box would be only as tall as its text, so
     anchoring to it put the editor at the top of the whole table. */
  .wl-dep {
    position: relative;
  }
  .wl-dep td.wl-ident {
    padding-right: 7rem;
  }
  .wl-dep td.wl-weight {
    position: absolute;
    right: 16px;
    top: 9px;
    width: auto;
    padding-left: 0;
    text-align: right;
  }
  /* The group band is a block too, so its split bar gets the full width. */
  .wl-group td {
    display: block;
  }
}

/* ─── Public model catalog (/models) ───────────────────────────────────────
   The catalog is an index, not a gallery. A model group is one ruled row and
   its routes read left-to-right on that same row, so eighty-one groups are
   scanned vertically instead of paged through eighty-one cards. The console's
   Models page is the operator's ledger of the same structure (weights, health,
   split); this is the reader's copy, so the two share a hairline grid and
   nothing else — no editor, no bar, no state.

   Colour is spent in exactly one place: the provider dot and its label.

   Naming: `mc-` = models catalog. */

.mc-masthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--admin-bg);
}

.mc-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.032em;
  color: var(--admin-text);
  text-wrap: balance;
}

/* The size of the catalog, stated once, as figures rather than a sentence. */
.mc-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
}
.mc-figure {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 26px;
  border-left: 1px solid var(--admin-border);
}
.mc-figure:first-child {
  padding-left: 0;
  border-left: 0;
}
/* A wrapped divider column leaves a stray rule at the start of the second
   line, so on a phone the figures become a 2×2 grid with no rules at all. */
@media (max-width: 639px) {
  .mc-figures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }
  .mc-figure {
    padding-left: 0;
    border-left: 0;
  }
}
/* From lg the figures sit to the right of the title, on their own side of a
   rule: the masthead reads as a heading and its measurement, not a heading
   followed by a stat bar. */
@media (min-width: 1024px) {
  .mc-figures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, auto));
    gap: 18px 34px;
    justify-content: end;
    padding-left: 34px;
    border-left: 1px solid var(--admin-border);
  }
  .mc-figures .mc-figure {
    padding-left: 0;
    border-left: 0;
  }
}
.mc-figure-label {
  margin: 0;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--admin-text-dim);
}
.mc-figure-num {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--admin-text);
}

/* Tool row. From sm up it sticks under the floating navbar and blurs what
   passes beneath it, so the search and the filters stay reachable across a
   long ledger. On a phone it scrolls away instead: two stacked control rows
   pinned under a 66px navbar would eat a fifth of the viewport. */
.mc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--admin-border);
}
@media (min-width: 640px) {
  .mc-toolbar {
    position: sticky;
    top: 72px;
    z-index: 20;
    background: rgba(5, 5, 5, 0.84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

/* Filter trigger: a field, not a chip — it opens a panel, so it is shaped
   like the control that owns the panel below it. */
.mc-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: 0 11px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 12.5px;
  color: var(--admin-text-muted);
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.mc-filter-btn:hover {
  border-color: var(--admin-border-hover);
  color: var(--admin-text);
}
.mc-filter-btn[aria-expanded="true"] {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(59, 130, 246, 0.08);
  color: var(--admin-text);
}
.mc-filter-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}
.mc-filter-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-panel {
  flex: 1 1 100%;
  margin-bottom: 4px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface);
  padding: 12px;
}
.mc-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mc-panel-note {
  font-size: 11px;
  color: var(--admin-text-dim);
}
.mc-reset {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 11.5px;
  color: var(--admin-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--admin-border-hover);
}
.mc-reset:hover {
  color: var(--admin-text);
}
.mc-reset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
  border-radius: 6px;
}

.mc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* 37 accounts wrap into more than a phone viewport. The panel scrolls instead
   of swallowing the ledger; every chip is still reachable by Tab, which
   scrolls the focused chip into view. */
@media (max-width: 639px) {
  .mc-chips {
    max-height: 40vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
  }
}
/* 36px reads as a tag on a mouse-driven screen and still clears the 44px
   floor under a finger. */
.mc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--admin-text-muted);
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.mc-chip:hover {
  border-color: var(--admin-border-hover);
  color: var(--admin-text);
}
.mc-chip[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
}
.mc-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}
.mc-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (pointer: coarse) {
  .mc-chip {
    min-height: 44px;
  }
}

/* Sort: a field, like the filter beside it — one control that names the order
   it is in, so the toolbar reads as three tools rather than a segmented
   widget with a floating label. */
.mc-sort {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 12.5px;
  color: var(--admin-text-muted);
  transition: border-color 0.16s ease, color 0.16s ease;
}
.mc-sort:hover {
  border-color: var(--admin-border-hover);
  color: var(--admin-text);
}
.mc-sort:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}

.mc-count {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--admin-text-dim);
}

/* ── the ledger ─────────────────────────────────────────────────────────── */

.mc-ledger {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--admin-surface);
  overflow: hidden;
}

/* Column header. Uppercase micro-labels are the house chrome, and here they
   name the two columns instead of decorating every value. */
.mc-ledger-head {
  display: none;
}
@media (min-width: 768px) {
  .mc-ledger-head {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 18px;
    padding: 9px 18px;
    border-bottom: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.012);
  }
  .mc-ledger-head span {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--admin-text-dim);
  }
}

.mc-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 13px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  transition: background-color 0.18s ease;
}
/* The row's provider, as a spine: colour marks the row you are on without
   tinting the text of eighty-one rows. */
.mc-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: hsl(var(--p-hue, 217) 80% 62% / 0);
  transition: background-color 0.18s ease;
}
.mc-row:hover::before,
.mc-row:focus-within::before {
  background: hsl(var(--p-hue, 217) 80% 62% / 0.55);
}
.mc-row:first-child {
  border-top: 0;
}
.mc-row:hover,
.mc-row:focus-within {
  background: rgba(255, 255, 255, 0.018);
}
@media (min-width: 768px) {
  .mc-row {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 18px;
    padding: 11px 18px;
  }
}

/* The group name is the id the caller sends, so it is set in the mono face —
   the one place the page raises its voice. */
.mc-idcell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mc-name {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--admin-text);
  overflow-wrap: anywhere;
}
.mc-alias {
  flex: none;
  border: 1px solid var(--admin-border);
  border-radius: 5px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--admin-text-muted);
  white-space: nowrap;
}
.mc-copy {
  margin-left: auto;
}
/* On a phone the copy button is pinned to the row's top-right instead of
   sharing the name's line: a long group id would otherwise either push the
   button onto a second line or squeeze the name into a narrow column. */
@media (max-width: 767px) {
  .mc-idcell {
    padding-right: 46px;
  }
  .mc-row .mc-copy {
    position: absolute;
    top: 8px;
    right: 10px;
    margin-left: 0;
  }
}

/* Routes: provider account + the upstream id it maps to. Colour appears only
   in the dot and in the account name that dot labels. */
.mc-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  min-width: 0;
}
.mc-route {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}
.mc-dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: hsl(var(--p-hue, 217) 80% 62%);
  box-shadow: 0 0 7px hsl(var(--p-hue, 217) 85% 62% / 0.55);
}
.mc-prov {
  flex: none;
  max-width: 9rem;
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: hsl(var(--p-hue, 217) 62% 82%);
}
.mc-mid {
  min-width: 0;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--admin-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* On a phone the id wraps instead of truncating: a `title` tooltip is no use
   to a finger, and the upstream id is the fact the reader came for. */
@media (max-width: 767px) {
  .mc-mid {
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

/* ── layout switch + card view ────────────────────────────────────────────
   Two readings of the same catalog: the ledger scans a long list, the cards
   let a group be looked at on its own. Same data, same filters, same sort. */

.mc-view {
  display: inline-flex;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.mc-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 44px;
  color: var(--admin-text-dim);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.mc-view-btn + .mc-view-btn {
  border-left: 1px solid var(--admin-border);
}
.mc-view-btn:hover {
  color: var(--admin-text);
}
.mc-view-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.055);
  color: var(--admin-text);
}
.mc-view-btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Separate boxes on a gap, not a hairline matrix: a matrix leaves the empty
   cells of a partial last row painted in the gap colour. */
.mc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
@media (min-width: 640px) {
  .mc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .mc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mc-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--admin-surface);
  padding: 8px 10px 12px 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
/* The card's own provider hue, as a wash from its top edge — the one effect
   on the page, and it only exists while the card is hovered or focused. The
   gradient is declared in that state rather than always-on at opacity 0, so
   automated contrast checks can still measure the resting card. */
.mc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
}
.mc-card:hover::after,
.mc-card:focus-within::after {
  background: radial-gradient(
    130% 90% at 100% 0%,
    hsl(var(--p-hue, 217) 85% 60% / 0.09),
    transparent 62%
  );
  opacity: 1;
}
.mc-card:hover,
.mc-card:focus-within {
  border-color: hsl(var(--p-hue, 217) 80% 62% / 0.32);
  background: rgba(255, 255, 255, 0.014);
}

/* Provider badges: the brand tile from web/public/logos/, or a letter tile in
   the account's hue when the type has no badge. */
.mc-marks {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.mc-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  overflow: hidden;
  border-radius: 7px;
}
.mc-mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mc-mark-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px solid hsl(var(--p-hue, 217) 80% 62% / 0.3);
  border-radius: 7px;
  background: hsl(var(--p-hue, 217) 80% 62% / 0.14);
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--p-hue, 217) 70% 84%);
}
.mc-mark-more {
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--admin-text-dim);
}
.mc-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.mc-card-name {
  min-width: 0;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--admin-text);
  overflow-wrap: anywhere;
}
.mc-card-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
/* The routes sit at the foot of the card, so a short card in a tall row does
   not open a hole in the middle of it. */
.mc-card-routes {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: auto 0 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  list-style: none;
}
.mc-card-route {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

/* ── Touch number stepper (unlayered on purpose) ─────────────────────────────
   On a touch screen the 26px vertical column splits into two ~17px buttons,
   far under the 44px floor, and stacking two 44px buttons inside a 34px-tall
   field would clip them (the wrapper is overflow:hidden). The field therefore
   becomes a row: the input, then an 88px stepper laid out horizontally.

   This must stay OUTSIDE `@layer components`. A caller's `px-*` utility lives
   in `@layer utilities` and beats every components-layer rule regardless of
   specificity, so the padding that reserved room for the stepper was dropped
   and the 88px stepper painted over the whole 72px weight field — the field
   could not be tapped to type at all (AUDIT #377). Making the stepper a
   sibling removes the need to reserve padding, so no utility can undo it. */
@media (hover: none), (pointer: coarse) {
  .admin-number-field {
    display: flex;
    align-items: stretch;
    gap: 6px;
  }
  .admin-number-field .admin-input {
    min-height: 44px;
    /* Let the input shrink beside the stepper instead of overflowing. */
    min-width: 0;
  }
  .admin-number-stepper {
    position: static;
    width: 88px;
    flex: none;
    flex-direction: row;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
  }
  .admin-number-stepper button {
    flex: 1;
    min-height: 44px;
  }
  .admin-number-stepper button + button {
    border-top: 0;
    border-left: 1px solid var(--admin-border);
  }
  /* The suffix label is positioned against the field, whose right edge is now
     the stepper's: shift it back over the input's own edge. */
  .admin-number-field > span.pointer-events-none {
    right: calc(94px + 8px);
  }
  /* The weight editor is the one field whose own width (72px) leaves no room
     to type once the stepper is a sibling. */
  .wl-weight {
    width: 5.5rem;
  }
  /* The shared control classes land at ~36px and ~38px, under the binding
     44px touch floor (AUDIT #486). Raised here rather than in the layer so a
     caller's height utility cannot shrink them back on a phone. */
  .admin-btn,
  .admin-input {
    min-height: 44px;
  }
}