/* Blitz - Linear-light + Linear-dark. Tailwind handles component
   styling (light-default classes with dark: variants; darkMode:'class'
   set in partials/head.html); this file holds only what utilities can't
   express: tokens, page background, scrollbars, keyframes, and markdown
   (prose) rendering inside context entries. */

:root {
  --accent: #e5484d; /* Linear indigo */
  color-scheme: light;
}
html.dark { color-scheme: dark; }

html, body {
  background: #fafafa;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
html.dark, html.dark body { background: #08090a; }

/* Thin scrollbars */
* { scrollbar-width: thin; scrollbar-color: #d4d6dc transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #d4d6dc; border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
html.dark * { scrollbar-color: #2a2c33 transparent; }
html.dark *::-webkit-scrollbar-thumb { background: #2a2c33; }

/* Fade-in for timeline entries */
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .18s ease-out both; }

/* Markdown inside context entries + AI summary */
.ctx-md { font-size: 13px; line-height: 1.6; color: #4b4f58; overflow-wrap: anywhere; }
.ctx-md p { margin: 0 0 .5em; }
.ctx-md p:last-child { margin-bottom: 0; }
.ctx-md h1, .ctx-md h2, .ctx-md h3 { color: #1c1e24; font-weight: 600; font-size: 13px; margin: .75em 0 .25em; }
.ctx-md ul, .ctx-md ol { margin: .25em 0 .5em; padding-left: 1.25em; }
.ctx-md ul { list-style: disc; }
.ctx-md ol { list-style: decimal; }
.ctx-md li { margin: .15em 0; }
.ctx-md a { color: #e5484d; text-decoration: none; }
.ctx-md a:hover { text-decoration: underline; }
.ctx-md code { background: #f1f1f3; border: 1px solid #e2e3e7; border-radius: 4px; padding: .05em .35em; font-size: 12px; color: #33363e; }
.ctx-md pre { background: #f4f4f6; border: 1px solid #e2e3e7; border-radius: 6px; padding: .6em .8em; overflow-x: auto; margin: .5em 0; }
.ctx-md pre code { background: none; border: none; padding: 0; }
.ctx-md blockquote { border-left: 2px solid #d4d6dc; padding-left: .75em; color: #7a7f88; margin: .5em 0; }
.ctx-md strong { color: #1c1e24; }
.ctx-md table { border-collapse: collapse; margin: .5em 0; }
.ctx-md th, .ctx-md td { border: 1px solid #e2e3e7; padding: .25em .6em; font-size: 12px; }

html.dark .ctx-md { color: #b4b8c0; }
html.dark .ctx-md h1, html.dark .ctx-md h2, html.dark .ctx-md h3 { color: #e6e8ec; }
html.dark .ctx-md a { color: #f2888c; }
html.dark .ctx-md code { background: #17181c; border-color: #24262c; color: #d3d6dd; }
html.dark .ctx-md pre { background: #101114; border-color: #24262c; }
html.dark .ctx-md blockquote { border-left-color: #34363e; color: #8a8f98; }
html.dark .ctx-md strong { color: #e6e8ec; }
html.dark .ctx-md th, html.dark .ctx-md td { border-color: #24262c; }
