globals.css 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. @import "tailwindcss";
  2. @import "tw-animate-css";
  3. @source "../../../node_modules/streamdown/dist/*.js";
  4. @custom-variant dark (&:is(.dark *));
  5. @theme inline {
  6. --radius-sm: calc(var(--radius) - 4px);
  7. --radius-md: calc(var(--radius) - 2px);
  8. --radius-lg: var(--radius);
  9. --radius-xl: calc(var(--radius) + 4px);
  10. --color-background: var(--background);
  11. --color-foreground: var(--foreground);
  12. --color-card: var(--card);
  13. --color-card-foreground: var(--card-foreground);
  14. --color-primary: var(--primary);
  15. --color-primary-foreground: var(--primary-foreground);
  16. --color-secondary: var(--secondary);
  17. --color-secondary-foreground: var(--secondary-foreground);
  18. --color-muted: var(--muted);
  19. --color-muted-foreground: var(--muted-foreground);
  20. --color-accent: var(--accent);
  21. --color-accent-foreground: var(--accent-foreground);
  22. --color-destructive: var(--destructive);
  23. --color-border: var(--border);
  24. --color-input: var(--input);
  25. --color-ring: var(--ring);
  26. --color-chart-1: var(--chart-1);
  27. --color-chart-2: var(--chart-2);
  28. --color-chart-3: var(--chart-3);
  29. --color-chart-4: var(--chart-4);
  30. }
  31. :root {
  32. --radius: 0.625rem;
  33. /* Restrained neutrals. Craft comes from type and spacing, not color. */
  34. --background: oklch(0.994 0 0);
  35. --foreground: oklch(0.205 0 0);
  36. --card: oklch(1 0 0);
  37. --card-foreground: oklch(0.205 0 0);
  38. --primary: oklch(0.205 0 0);
  39. --primary-foreground: oklch(0.985 0 0);
  40. --secondary: oklch(0.97 0 0);
  41. --secondary-foreground: oklch(0.205 0 0);
  42. --muted: oklch(0.973 0 0);
  43. --muted-foreground: oklch(0.553 0 0);
  44. --accent: oklch(0.968 0 0);
  45. --accent-foreground: oklch(0.205 0 0);
  46. --destructive: oklch(0.585 0.2 27.3);
  47. --border: oklch(0.917 0 0);
  48. --input: oklch(0.917 0 0);
  49. --ring: oklch(0.708 0 0);
  50. /* Muted, functional data colors — used only when a chart names a tone. */
  51. --chart-1: oklch(0.5 0.13 277);
  52. --chart-2: oklch(0.6 0.12 162);
  53. --chart-3: oklch(0.7 0.12 70);
  54. --chart-4: oklch(0.58 0.12 248);
  55. }
  56. .dark {
  57. --background: oklch(0.165 0 0);
  58. --foreground: oklch(0.985 0 0);
  59. --card: oklch(0.205 0 0);
  60. --card-foreground: oklch(0.985 0 0);
  61. --primary: oklch(0.985 0 0);
  62. --primary-foreground: oklch(0.205 0 0);
  63. --secondary: oklch(0.265 0 0);
  64. --secondary-foreground: oklch(0.985 0 0);
  65. --muted: oklch(0.265 0 0);
  66. --muted-foreground: oklch(0.708 0 0);
  67. --accent: oklch(0.27 0 0);
  68. --accent-foreground: oklch(0.985 0 0);
  69. --destructive: oklch(0.704 0.191 22.2);
  70. --border: oklch(1 0 0 / 9%);
  71. --input: oklch(1 0 0 / 13%);
  72. --ring: oklch(0.556 0 0);
  73. --chart-1: oklch(0.62 0.13 277);
  74. --chart-2: oklch(0.68 0.12 162);
  75. --chart-3: oklch(0.76 0.12 70);
  76. --chart-4: oklch(0.66 0.12 248);
  77. }
  78. @layer base {
  79. * {
  80. @apply border-border outline-ring/50;
  81. }
  82. body {
  83. @apply bg-background text-foreground;
  84. }
  85. }
  86. /* Map Tailwind's font tokens to Geist. next/font sets --font-geist-* on
  87. <body>, so this must live on body (not :root, where those vars are
  88. undefined) for `font-sans`/`font-mono` to resolve to Geist / Geist Mono. */
  89. body {
  90. --font-sans: var(--font-geist-sans);
  91. --font-mono: var(--font-geist-mono);
  92. }
  93. button {
  94. cursor: pointer;
  95. }
  96. /* One restrained elevation step — a hairline, not a drop shadow. */
  97. .shadow-subtle {
  98. box-shadow:
  99. 0 1px 1px oklch(0 0 0 / 0.04),
  100. 0 2px 6px -2px oklch(0 0 0 / 0.06);
  101. }
  102. /* Inline code in agent markdown gets a shaded pill. `:not(pre) > code` targets
  103. only inline code, leaving fenced code blocks (Shiki) untouched. The tint is
  104. derived from the muted-foreground so it reads in both light and dark mode. */
  105. .markdown :not(pre) > code {
  106. border-radius: 0.375rem;
  107. background-color: color-mix(in oklab, var(--muted-foreground) 16%, transparent);
  108. padding: 0.1em 0.35em;
  109. font-size: 0.85em;
  110. font-family: var(--font-mono);
  111. }
  112. /* A bright band sweeps across dim text. `inline-block` is essential: it sizes
  113. the gradient to the text itself, so the band actually passes over the words
  114. (on a full-width block the band rarely reaches the short label). */
  115. @keyframes shimmer {
  116. 0% {
  117. background-position: 100% 0;
  118. }
  119. 100% {
  120. background-position: 0% 0;
  121. }
  122. }
  123. .animate-shimmer {
  124. display: inline-block;
  125. color: transparent;
  126. background-image: linear-gradient(
  127. 90deg,
  128. var(--muted-foreground) 0%,
  129. var(--muted-foreground) 40%,
  130. var(--foreground) 50%,
  131. var(--muted-foreground) 60%,
  132. var(--muted-foreground) 100%
  133. );
  134. background-size: 300% 100%;
  135. -webkit-background-clip: text;
  136. background-clip: text;
  137. -webkit-text-fill-color: transparent;
  138. animation: shimmer 1.5s linear infinite;
  139. }
  140. @media (prefers-reduced-motion: reduce) {
  141. .animate-shimmer {
  142. animation: none;
  143. color: var(--muted-foreground);
  144. -webkit-text-fill-color: var(--muted-foreground);
  145. }
  146. }