/* stocks-llm homepage stylesheet (SPEC AX.3).
 *
 * Replaces the Tailwind Play CDN (`cdn.tailwindcss.com`) — the runtime JIT
 * compiler Tailwind explicitly marks "not for production" (render-blocking,
 * unpredictable, ships the whole compiler to every visitor). This is a static,
 * hand-authored file containing EXACTLY the set of Tailwind v3 utility classes
 * actually used by public/index.html and the client bundles (app.js, card.js,
 * render.js, match.js, history.js, deeplink.js, watchlist.js) — matching how the
 * server-rendered pages (lib/*-page.js) already hand-roll plain CSS with no
 * runtime dependency.
 *
 * Values mirror Tailwind v3's default theme (colors = the neutral `gray`/`sky`/
 * `red` palettes; spacing = the 0.25rem scale; breakpoints sm=640px, lg=1024px)
 * so the rendered result is identical to the CDN build it replaces. Custom class
 * names (cc-*, sfb-*, sllm-embed, is-zero, disclaimer-*, composer-row,
 * scroll-region, tab-btn, example-q, chat-user/assistant) are styled elsewhere
 * (index.html <style>, feedback.js, embed.js) and are intentionally NOT here.
 *
 * A coverage test (test/styles-css.test.js) asserts every Tailwind class used in
 * the served HTML/JS has a matching selector here, so a newly-added utility that
 * is forgotten here fails the suite instead of silently rendering unstyled.
 *
 * If the used-utility set changes, edit this file by hand (same discipline as the
 * SSR page CSS) — there is no build step, by project design.
 */

/* ============================ Tailwind v3 Preflight ==========================
 * The base reset the page relied on from the CDN: border-box sizing, zeroed
 * margins (the page spaces with mt-*/mb-* utilities and assumes h1/p have no
 * default margin), inherited link color/decoration (links style via text-*/
 * no-underline utilities), reset button/input chrome (buttons style via bg-*),
 * and the default sans font stack. Faithful subset of Tailwind's preflight.
 */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }
::before, ::after { --tw-content: ''; }
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
body { margin: 0; line-height: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: inherit; }
button, input, select { font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; }
button, select { text-transform: none; }
button, [type='button'], [type='submit'] { -webkit-appearance: button; background-color: transparent; background-image: none; cursor: pointer; }
:-moz-focusring { outline: auto; }
h1, h2, h3, h4, h5, h6 { }

/* ============================ Utilities (base) =============================== */

/* display */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* flexbox / grid */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-full { grid-column: 1 / -1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }

/* sizing */
.w-full { width: 100%; }
.min-h-0 { min-height: 0px; }
.min-w-0 { min-width: 0px; }
.min-h-\[44px\] { min-height: 44px; }
.max-w-2xl { max-width: 42rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-full { max-width: 100%; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }

/* spacing — margin */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.ml-8 { margin-left: 2rem; }
.mr-8 { margin-right: 2rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

/* spacing — padding */
.p-0 { padding: 0; }
.p-4 { padding: 1rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-4 { padding-top: 1rem; }
.pb-3 { padding-bottom: 0.75rem; }

/* gap */
.gap-0\.5 { gap: 0.125rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-1 { row-gap: 0.25rem; }

/* borders */
.border { border-width: 1px; }
.border-0 { border-width: 0px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-collapse { border-collapse: collapse; }
.border-gray-600 { border-color: #4b5563; }
.border-gray-700 { border-color: #374151; }
.border-gray-800 { border-color: #1f2937; }
.border-gray-800\/70 { border-color: rgb(31 41 55 / 0.7); }
.border-gray-900 { border-color: #111827; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* backgrounds */
.bg-transparent { background-color: transparent; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-gray-950 { background-color: #030712; }
.bg-sky-600 { background-color: #0284c7; }

/* typography — color */
.text-inherit { color: inherit; }
.text-white { color: #ffffff; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-sky-300 { color: #7dd3fc; }
.text-sky-400 { color: #38bdf8; }
.text-red-400 { color: #f87171; }

/* typography — size (font-size + default line-height, per Tailwind) */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }

/* typography — weight */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* typography — leading (line-height only) */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

/* typography — misc */
.text-left { text-align: left; }
.text-center { text-align: center; }
.underline { text-decoration-line: underline; }
.no-underline { text-decoration-line: none; }
.break-words { overflow-wrap: break-word; }

/* interactivity */
.cursor-pointer { cursor: pointer; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }

/* ============================ Utilities (state variants) ==================== */
.hover\:bg-gray-700:hover { background-color: #374151; }
.hover\:bg-sky-500:hover { background-color: #0ea5e9; }
.hover\:text-gray-300:hover { color: #d1d5db; }
.hover\:text-white:hover { color: #ffffff; }
.focus\:border-sky-500:focus { border-color: #0ea5e9; }
.disabled\:opacity-40:disabled { opacity: 0.4; }

/* ============================ Utilities (responsive) =======================
 * Placed last so a matched breakpoint rule wins over the same-specificity base
 * utility (e.g. `hidden sm:flex` → display:none until ≥640px, then flex).
 */
@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
