|
| 1 | +@import "@opencode-ai/ui/v2/styles/colors.css"; |
| 2 | + |
| 3 | +@font-face { |
| 4 | + font-family: "Inter"; |
| 5 | + src: url("@opencode-ai/ui/fonts/Inter.ttf") format("truetype"); |
| 6 | + font-style: normal; |
| 7 | + font-weight: 100 900; |
| 8 | + font-display: swap; |
| 9 | +} |
| 10 | + |
| 11 | +[data-page="go"] { |
| 12 | + --go-console-bg: var(--v2-grey-50); |
| 13 | + --go-console-surface: var(--v2-grey-100); |
| 14 | + --go-console-track: var(--v2-grey-200); |
| 15 | + --go-console-text: var(--v2-grey-1100); |
| 16 | + --go-console-secondary: var(--v2-grey-700); |
| 17 | + --go-console-muted: var(--v2-grey-600); |
| 18 | + --go-console-border: var(--v2-alpha-dark-8); |
| 19 | + --go-console-icon: var(--v2-grey-600); |
| 20 | + |
| 21 | + @media (prefers-color-scheme: dark) { |
| 22 | + --go-console-bg: var(--v2-grey-1000); |
| 23 | + --go-console-surface: var(--v2-grey-900); |
| 24 | + --go-console-track: var(--v2-grey-800); |
| 25 | + --go-console-text: var(--v2-grey-200); |
| 26 | + --go-console-secondary: var(--v2-grey-500); |
| 27 | + --go-console-muted: var(--v2-grey-600); |
| 28 | + --go-console-border: var(--v2-alpha-light-8); |
| 29 | + --go-console-icon: var(--v2-grey-600); |
| 30 | + } |
| 31 | +} |
| 32 | + |
| 33 | +[data-component="go-plan-chart"] { |
| 34 | + margin: 0; |
| 35 | + padding: 2rem var(--padding) 3rem; |
| 36 | + background: var(--go-console-bg); |
| 37 | + color: var(--go-console-text); |
| 38 | + font-family: "Inter", sans-serif; |
| 39 | + font-size: 0.8125rem; |
| 40 | + font-weight: 440; |
| 41 | + line-height: 1.25rem; |
| 42 | + letter-spacing: -0.04px; |
| 43 | + text-rendering: geometricPrecision; |
| 44 | + font-variant-numeric: tabular-nums; |
| 45 | + -webkit-font-smoothing: antialiased; |
| 46 | + |
| 47 | + [data-slot="heading"] { |
| 48 | + display: flex; |
| 49 | + align-items: end; |
| 50 | + justify-content: space-between; |
| 51 | + gap: 1rem; |
| 52 | + margin-bottom: 0.75rem; |
| 53 | + } |
| 54 | + h2 { |
| 55 | + font-size: 0.9375rem; |
| 56 | + font-weight: 530; |
| 57 | + line-height: 1.25rem; |
| 58 | + margin-bottom: 0.25rem; |
| 59 | + } |
| 60 | + [data-slot="heading"] p { |
| 61 | + color: var(--go-console-muted); |
| 62 | + line-height: 1.25rem; |
| 63 | + } |
| 64 | + [data-slot="tier-switch"] { |
| 65 | + display: flex; |
| 66 | + align-items: center; |
| 67 | + gap: 0.25rem; |
| 68 | + } |
| 69 | + [data-slot="tier-switch"] i { |
| 70 | + width: 3px; |
| 71 | + height: 12px; |
| 72 | + border-radius: 1px; |
| 73 | + } |
| 74 | + [data-tier="go"] { |
| 75 | + background: linear-gradient(var(--v2-yellow-500), var(--v2-yellow-600)); |
| 76 | + } |
| 77 | + [data-tier="plus"] { |
| 78 | + background: linear-gradient(var(--v2-orange-500), var(--v2-orange-600)); |
| 79 | + } |
| 80 | + button { |
| 81 | + display: flex; |
| 82 | + align-items: center; |
| 83 | + gap: 0.5rem; |
| 84 | + background: none; |
| 85 | + border: 0; |
| 86 | + color: inherit; |
| 87 | + font: inherit; |
| 88 | + font-weight: 530; |
| 89 | + padding: 0.375rem 0.5rem; |
| 90 | + cursor: pointer; |
| 91 | + white-space: nowrap; |
| 92 | + } |
| 93 | + [data-slot="tier-switch"] button { |
| 94 | + color: var(--go-console-secondary); |
| 95 | + border-radius: 4px; |
| 96 | + transition: |
| 97 | + background-color 180ms ease, |
| 98 | + opacity 180ms ease; |
| 99 | + } |
| 100 | + [data-slot="tier-switch"] button[aria-pressed="false"] { |
| 101 | + opacity: 0.4; |
| 102 | + font-weight: 440; |
| 103 | + } |
| 104 | + [data-slot="tier-switch"] button[aria-pressed="false"]:is(:hover, :focus-visible) { |
| 105 | + opacity: 0.75; |
| 106 | + } |
| 107 | + [data-slot="tier-switch"] button[aria-pressed="true"] { |
| 108 | + background: var(--go-console-surface); |
| 109 | + color: var(--go-console-text); |
| 110 | + } |
| 111 | + [data-slot="tier-switch"] button:hover { |
| 112 | + color: var(--go-console-text); |
| 113 | + } |
| 114 | + [data-slot="expand"][aria-expanded="true"] svg { |
| 115 | + transform: rotate(180deg); |
| 116 | + } |
| 117 | + [data-slot="scroll"] { |
| 118 | + overflow-x: auto; |
| 119 | + } |
| 120 | + table { |
| 121 | + width: 100%; |
| 122 | + min-width: 48rem; |
| 123 | + table-layout: fixed; |
| 124 | + border-spacing: 0; |
| 125 | + font-size: 0.8125rem; |
| 126 | + } |
| 127 | + thead { |
| 128 | + color: var(--go-console-secondary); |
| 129 | + } |
| 130 | + thead tr { |
| 131 | + background: var(--go-console-surface); |
| 132 | + } |
| 133 | + thead th { |
| 134 | + padding: 0.5rem 1rem; |
| 135 | + border-block: 1px solid var(--go-console-border); |
| 136 | + font-weight: 440; |
| 137 | + text-align: end; |
| 138 | + white-space: nowrap; |
| 139 | + } |
| 140 | + thead th:first-child { |
| 141 | + text-align: start; |
| 142 | + border-inline-start: 1px solid var(--go-console-border); |
| 143 | + border-start-start-radius: 6px; |
| 144 | + border-end-start-radius: 6px; |
| 145 | + } |
| 146 | + thead th:last-child { |
| 147 | + border-inline-end: 1px solid var(--go-console-border); |
| 148 | + border-start-end-radius: 6px; |
| 149 | + border-end-end-radius: 6px; |
| 150 | + } |
| 151 | + tbody th { |
| 152 | + padding: 0.5rem 1rem; |
| 153 | + text-align: start; |
| 154 | + font-weight: 400; |
| 155 | + color: var(--go-console-text); |
| 156 | + } |
| 157 | + [data-slot="model"] { |
| 158 | + display: inline-flex; |
| 159 | + flex-wrap: wrap; |
| 160 | + align-items: center; |
| 161 | + gap: 0.375rem; |
| 162 | + } |
| 163 | + [data-slot="model"] small { |
| 164 | + border: 1px solid var(--go-console-border); |
| 165 | + padding: 0 0.25rem; |
| 166 | + font-size: 0.625rem; |
| 167 | + } |
| 168 | + [data-slot="model"] a { |
| 169 | + display: inline-flex; |
| 170 | + align-items: center; |
| 171 | + color: var(--go-console-muted); |
| 172 | + text-decoration: none; |
| 173 | + } |
| 174 | + [data-slot="bars"] { |
| 175 | + position: relative; |
| 176 | + } |
| 177 | + [data-slot="gridline"] { |
| 178 | + position: absolute; |
| 179 | + inset-block: 0; |
| 180 | + border-inline-start: 1px dashed var(--go-console-border); |
| 181 | + transition: inset-inline-start 600ms cubic-bezier(0.22, 1, 0.36, 1); |
| 182 | + } |
| 183 | + [data-slot="track"] { |
| 184 | + position: relative; |
| 185 | + display: flex; |
| 186 | + gap: 0.25rem; |
| 187 | + height: 0.5rem; |
| 188 | + margin: 0.5rem 0; |
| 189 | + } |
| 190 | + [data-slot="track"] > [data-tier] { |
| 191 | + position: relative; |
| 192 | + border-radius: 2px; |
| 193 | + background: linear-gradient(var(--v2-yellow-500), var(--v2-yellow-600)); |
| 194 | + transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1); |
| 195 | + } |
| 196 | + [data-slot="track"] > [data-tier]::after { |
| 197 | + content: ""; |
| 198 | + position: absolute; |
| 199 | + inset: 0; |
| 200 | + border-radius: inherit; |
| 201 | + background: linear-gradient(var(--v2-orange-500), var(--v2-orange-600)); |
| 202 | + opacity: 0; |
| 203 | + transition: opacity 300ms ease; |
| 204 | + } |
| 205 | + [data-slot="track"] > [data-tier="plus"]::after { |
| 206 | + opacity: 1; |
| 207 | + } |
| 208 | + [data-slot="remainder"] { |
| 209 | + flex: 1; |
| 210 | + border-radius: 2px; |
| 211 | + background: var(--go-console-track); |
| 212 | + } |
| 213 | + [data-slot="number"] { |
| 214 | + padding: 0.5rem 1rem; |
| 215 | + text-align: end; |
| 216 | + white-space: nowrap; |
| 217 | + } |
| 218 | + [data-slot="number"] span { |
| 219 | + display: block; |
| 220 | + line-height: 1.25rem; |
| 221 | + } |
| 222 | + [data-slot="plan-value"] { |
| 223 | + animation: go-plan-value-in 300ms ease-out both; |
| 224 | + } |
| 225 | + [data-slot="axis"] { |
| 226 | + position: relative; |
| 227 | + height: 2rem; |
| 228 | + color: var(--go-console-muted); |
| 229 | + font-size: 0.6875rem; |
| 230 | + } |
| 231 | + [data-slot="axis"] span { |
| 232 | + position: absolute; |
| 233 | + top: 0.25rem; |
| 234 | + transform: translateX(-50%); |
| 235 | + transition: inset-inline-start 600ms cubic-bezier(0.22, 1, 0.36, 1); |
| 236 | + } |
| 237 | + &:dir(rtl) [data-slot="axis"] span { |
| 238 | + transform: translateX(50%); |
| 239 | + } |
| 240 | + figcaption { |
| 241 | + display: flex; |
| 242 | + align-items: center; |
| 243 | + justify-content: space-between; |
| 244 | + gap: 1rem; |
| 245 | + margin-top: 0.75rem; |
| 246 | + border-top: 1px solid var(--go-console-border); |
| 247 | + padding-top: 0.75rem; |
| 248 | + } |
| 249 | + [data-slot="expand"] { |
| 250 | + padding-inline: 0; |
| 251 | + } |
| 252 | + figcaption a { |
| 253 | + color: var(--go-console-secondary); |
| 254 | + } |
| 255 | + :is(button, a):focus-visible { |
| 256 | + outline: 2px solid currentColor; |
| 257 | + outline-offset: 3px; |
| 258 | + } |
| 259 | + @media (max-width: 55rem) { |
| 260 | + [data-slot="heading"] { |
| 261 | + align-items: start; |
| 262 | + flex-direction: column; |
| 263 | + } |
| 264 | + } |
| 265 | + @media (prefers-reduced-motion: reduce) { |
| 266 | + [data-slot="tier-switch"] button, |
| 267 | + [data-slot="gridline"], |
| 268 | + [data-slot="track"] > [data-tier], |
| 269 | + [data-slot="track"] > [data-tier]::after, |
| 270 | + [data-slot="axis"] span { |
| 271 | + transition: none; |
| 272 | + } |
| 273 | + [data-slot="plan-value"] { |
| 274 | + animation: none; |
| 275 | + } |
| 276 | + } |
| 277 | +} |
| 278 | + |
| 279 | +@keyframes go-plan-value-in { |
| 280 | + from { |
| 281 | + opacity: 0.3; |
| 282 | + transform: translateY(3px); |
| 283 | + } |
| 284 | + to { |
| 285 | + opacity: 1; |
| 286 | + transform: translateY(0); |
| 287 | + } |
| 288 | +} |
0 commit comments