/* Artbloom — self-contained UI stylesheet. No external CDN.
   Implements the exact utility classes used by the templates so the
   compiled Go binary renders identically online or offline. */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; border-color: #e2e8f0; }

html {
  -webkit-text-size-adjust: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
html.h-full { height: 100%; }
body { color: #0f172a; background: #f8fafc; font-size: 1rem; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; }
p { line-height: 1.5; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: #0f172a; background: #fff; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; }

pre { white-space: pre; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

.copy-key { cursor: pointer; }
details > summary { cursor: pointer; }
canvas#usageChart { width: 100%; height: 90px; display: block; }

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

/* flex */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* gap */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* stacked spacing / dividers */
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.divide-y > * + * { border-top: 1px solid #e2e8f0; }
.divide-slate-100 > * + * { border-top-color: #f1f5f9; }

/* sizing */
.h-full { height: 100%; }
.min-h-full { min-height: 100%; }
.h-14 { height: 3.5rem; }
.w-full { width: 100%; }
.w-64 { width: 16rem; }
.w-32 { width: 8rem; }
.min-w-full { min-width: 100%; }
.max-w-6xl { max-width: 72rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-sm { max-width: 24rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.overflow-x-auto { overflow-x: auto; }
.break-all { word-break: break-all; }

/* margin */
.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; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }

/* padding */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.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\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-4 { padding-top: 1rem; }

/* borders */
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-dashed { border-style: dashed; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-red-200 { border-color: #fecaca; }
.border-green-200 { border-color: #bbf7d0; }
.border-emerald-200 { border-color: #a7f3d0; }

/* radius */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

/* backgrounds */
.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-900 { background-color: #0f172a; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-red-50 { background-color: #fef2f2; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-emerald-50 { background-color: #ecfdf5; }

/* text colors */
.text-white { color: #fff; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: #0f172a; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-700 { color: #4338ca; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }
.text-green-800 { color: #166534; }
.text-emerald-600 { color: #059669; }
.text-emerald-900 { color: #064e3b; }

/* font size */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

/* weight / align / transform */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.tracking-tight { letter-spacing: -0.025em; }
.capitalize { text-transform: capitalize; }

/* hover */
.hover\:underline:hover { text-decoration: underline; }
.hover\:text-indigo-600:hover { color: #4f46e5; }
.hover\:text-indigo-500:hover { color: #6366f1; }
.hover\:text-slate-900:hover { color: #0f172a; }
.hover\:bg-indigo-500:hover { background-color: #6366f1; }
.hover\:bg-white:hover { background-color: #fff; }
.hover\:border-indigo-300:hover { border-color: #a5b4fc; }

/* form controls: consistent native look */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 1px;
}
::placeholder { color: #94a3b8; }

/* responsive: >= 640px */
@media (min-width: 640px) {
  .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\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:col-span-1 { grid-column: span 1 / span 1; }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
}

/* responsive: >= 1024px */
@media (min-width: 1024px) {
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:col-span-1 { grid-column: span 1 / span 1; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}
