|
115 | 115 | margin-right: var(--vp-offset, calc(50% - 50vw)); |
116 | 116 | } |
117 | 117 |
|
118 | | -/* ═══ "Built for agents" band — the source world returns mid-page ══════════ |
119 | | - A full-width carbon strip. Every element is class-targeted under `.vp-doc |
120 | | - .agents` so it beats the default markdown typography cleanly. */ |
| 118 | +/* ═══ "Built for agents" band — mode-aware ════════════════════════════════ |
| 119 | + Follows the appearance toggle. In LIGHT mode it is a sheet-world section: |
| 120 | + warm paper ground bounded by hairline dimension rules top and bottom, ink |
| 121 | + copy, a redline eyebrow — a distinct measured section against the page bg. |
| 122 | + In DARK mode the `.dark` overrides at the foot of this block restore the |
| 123 | + original carbon "source world returns mid-page" strip exactly. |
| 124 | + Every element is class-targeted under `.vp-doc .agents` so it beats the |
| 125 | + default markdown typography cleanly. |
| 126 | +
|
| 127 | + The one constant across modes is the `.agents__term` terminal block: source |
| 128 | + lives in the terminal, so it stays carbon in both modes (mirroring how |
| 129 | + inner-page code blocks are carbon on paper). The solid CTA is a fixed-color |
| 130 | + redline (see `--solid` below) valid on either ground. */ |
121 | 131 | .vp-doc .agents { |
122 | | - background: var(--carbon); |
123 | | - color: var(--src-fg); |
| 132 | + background: var(--paper); |
| 133 | + color: var(--ink); |
| 134 | + border-block: 1px solid var(--hairline); |
124 | 135 | padding-block: clamp(56px, 8vw, 104px); |
125 | 136 | } |
126 | 137 | .vp-doc .agents__inner { |
|
133 | 144 | font-family: var(--font-mono); |
134 | 145 | font-size: 12px; |
135 | 146 | letter-spacing: 0.04em; |
136 | | - color: var(--plum-bright); |
| 147 | + color: var(--redline-ink); /* light: redline-ink on paper 5.8:1 */ |
137 | 148 | } |
138 | 149 | .vp-doc .agents__title { |
139 | 150 | margin: 0; |
|
146 | 157 | letter-spacing: -0.01em; |
147 | 158 | line-height: 1.05; |
148 | 159 | font-size: clamp(2rem, 4.4vw, 3.2rem); |
149 | | - color: var(--src-fg); |
| 160 | + color: var(--ink); /* light: ink on paper 14:1 */ |
150 | 161 | } |
151 | 162 | .vp-doc .agents__lede { |
152 | 163 | margin: 20px 0 0; |
153 | 164 | max-width: 56ch; |
154 | 165 | font-family: var(--font-body); |
155 | 166 | font-size: 1.05rem; |
156 | 167 | line-height: 1.65; |
157 | | - color: var(--src-muted); |
| 168 | + color: var(--ink-muted); /* light: ink-muted on paper 5.4:1 */ |
158 | 169 | } |
159 | 170 | .vp-doc .agents__code { |
160 | 171 | font-family: var(--font-mono); |
161 | 172 | font-size: 0.88em; |
162 | | - color: var(--plum-bright); |
| 173 | + color: var(--redline-ink); /* light: redline-ink on paper 5.8:1 */ |
163 | 174 | background: transparent; |
164 | 175 | padding: 0; |
165 | 176 | border: 0; |
|
217 | 228 | transform: translateY(1px); |
218 | 229 | } |
219 | 230 | .vp-doc .agents__btn--solid { |
220 | | - background: var(--redline); |
| 231 | + /* FIXED redline — never mode-flips. var(--redline) becomes #e2564a in dark, |
| 232 | + where white-on-it is only 3.7:1 (fails AA); a fixed #b3261e gives |
| 233 | + white-on-it 6.5:1 on either ground. Same fixed-color reasoning as the |
| 234 | + .agents__flag micro-label above. */ |
| 235 | + background: #b3261e; |
221 | 236 | color: #fff; |
222 | 237 | } |
223 | 238 | .vp-doc .agents__btn--solid:hover { |
224 | | - background: color-mix(in srgb, var(--redline) 90%, #fff); |
| 239 | + /* lighten the ground toward white; white stays 5.3:1 (AA) */ |
| 240 | + background: color-mix(in srgb, #b3261e 88%, #fff); |
225 | 241 | } |
| 242 | +/* Ghost button — mode-aware. Light: hairline border + ink text, redline hover. |
| 243 | + Dark override (below) restores the source-world ghost. */ |
226 | 244 | .vp-doc .agents__btn--ghost { |
| 245 | + border-color: var(--hairline); |
| 246 | + color: var(--ink); |
| 247 | +} |
| 248 | +.vp-doc .agents__btn--ghost:hover { |
| 249 | + border-color: color-mix(in srgb, var(--redline) 60%, transparent); |
| 250 | + color: var(--redline-ink); |
| 251 | +} |
| 252 | + |
| 253 | +/* ── Dark mode: restore the original carbon "source world" band ──────────── */ |
| 254 | +.dark .vp-doc .agents { |
| 255 | + background: var(--carbon); |
| 256 | + color: var(--src-fg); |
| 257 | + border-block-color: transparent; |
| 258 | +} |
| 259 | +.dark .vp-doc .agents__eyebrow { |
| 260 | + color: var(--plum-bright); |
| 261 | +} |
| 262 | +.dark .vp-doc .agents__title { |
| 263 | + color: var(--src-fg); |
| 264 | +} |
| 265 | +.dark .vp-doc .agents__lede { |
| 266 | + color: var(--src-muted); |
| 267 | +} |
| 268 | +.dark .vp-doc .agents__code { |
| 269 | + color: var(--plum-bright); |
| 270 | +} |
| 271 | +.dark .vp-doc .agents__btn--ghost { |
227 | 272 | border-color: var(--src-border); |
228 | 273 | color: var(--src-fg); |
229 | 274 | } |
230 | | -.vp-doc .agents__btn--ghost:hover { |
| 275 | +.dark .vp-doc .agents__btn--ghost:hover { |
231 | 276 | border-color: color-mix(in srgb, var(--plum) 60%, transparent); |
232 | 277 | color: #fff; |
233 | 278 | } |
0 commit comments