:root {
  --primary: #0284c7;
  --primary-hover: #1d4ed8;
  --accent: #f59e0b;
  --pagebg: #f8fafc;
  --surface: #ffffff;
  --bodytext: #0f172a;
  --mutedtext: #64748b;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Base */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: var(--font-family, system-ui, sans-serif); }
body { margin: 0; line-height: inherit; background-color: var(--pagebg); color: var(--bodytext); min-height: 100vh; display: flex; flex-direction: column; }
hr { height: 0; color: inherit; border-top-width: 1px; }
abbr:where([title]) { text-decoration: underline dotted; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
blockquote, dl, dd, p, figure { margin: 0; }
img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; max-width: 100%; }

/* Core Layout Utilities */
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.w-2 { width: 0.5rem; } .h-2 { height: 0.5rem; }
.w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-3\.5 { width: 0.875rem; } .h-3\.5 { height: 0.875rem; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-7 { width: 1.75rem; } .h-7 { height: 1.75rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-14 { width: 3.5rem; } .h-14 { height: 3.5rem; }
.h-14 { height: 3.5rem; } .h-16 { height: 4rem; } .h-20 { height: 5rem; }

.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-md { max-width: 28rem; }
.max-w-\[200px\] { max-width: 200px; }

.mx-auto { margin-left: auto; margin-right: auto; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Spacing */
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }

.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.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-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.pt-0\.5 { padding-top: 0.125rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pl-2\.5 { padding-left: 0.625rem; }
.pl-4 { padding-left: 1rem; }
.pr-4 { padding-right: 1rem; }

.m-0 { margin: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.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-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-2\.5 { margin-bottom: 0.625rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }

/* Space-Between helpers */
.space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }
.space-x-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.375rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.space-y-12 > :not([hidden]) ~ :not([hidden]) { margin-top: 3rem; }

/* Typography */
.text-2xs { font-size: 0.6875rem; line-height: 0.875rem; }
.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; }
.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; }
.text-5xl { font-size: 3rem; line-height: 1.15; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-sans { font-family: var(--font-family, system-ui, -apple-system, sans-serif); }
.font-serif { font-family: var(--font-family, Georgia, Cambria, serif); }

.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.overflow-x-auto { overflow-x: auto; }
.overflow-hidden { overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.italic { font-style: italic; }

/* Colors & Theme Variables */
.bg-surface { background-color: var(--surface); }
.bg-pagebg { background-color: var(--pagebg); }
.bg-primary { background-color: var(--primary); }
.bg-primary\/5 { background-color: color-mix(in srgb, var(--primary) 5%, transparent); }
.bg-primary\/10 { background-color: color-mix(in srgb, var(--primary) 10%, transparent); }
.bg-primary\/15 { background-color: color-mix(in srgb, var(--primary) 15%, transparent); }
.bg-primary\/20 { background-color: color-mix(in srgb, var(--primary) 20%, transparent); }
.bg-accent { background-color: var(--accent); }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-50\/40 { background-color: rgba(249, 250, 251, 0.4); }
.bg-gray-50\/70 { background-color: rgba(249, 250, 251, 0.7); }
.bg-gray-50\/80 { background-color: rgba(249, 250, 251, 0.8); }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-100\/70 { background-color: rgba(243, 244, 246, 0.7); }
.bg-gray-900 { background-color: #111827; }
.bg-transparent { background-color: transparent; }

.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops, transparent, transparent)); }
.from-primary\/10 { --tw-gradient-from: color-mix(in srgb, var(--primary) 10%, transparent); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.via-surface { --tw-gradient-stops: var(--tw-gradient-from), var(--surface), var(--tw-gradient-to, transparent); }
.to-accent\/5 { --tw-gradient-to: color-mix(in srgb, var(--accent) 5%, transparent); }
.to-surface { --tw-gradient-to: var(--surface); }

.text-bodytext { color: var(--bodytext); }
.text-bodytext\/80 { color: color-mix(in srgb, var(--bodytext) 80%, transparent); }
.text-bodytext\/85 { color: color-mix(in srgb, var(--bodytext) 85%, transparent); }
.text-bodytext\/90 { color: color-mix(in srgb, var(--bodytext) 90%, transparent); }
.text-mutedtext { color: var(--mutedtext); }
.text-primary { color: var(--primary); }
.text-white { color: #ffffff; }
.text-accent { color: var(--accent); }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }

/* Borders & Dividers */
.border { border-width: 1px; border-color: #e2e8f0; }
.border-t { border-top-width: 1px; border-color: #e2e8f0; }
.border-b { border-bottom-width: 1px; border-color: #e2e8f0; }
.border-l { border-left-width: 1px; border-color: #e2e8f0; }
.border-r { border-right-width: 1px; border-color: #e2e8f0; }
.border-l-4 { border-left-width: 4px; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; }

.border-transparent { border-color: transparent; }
.border-primary { border-color: var(--primary); }
.border-primary\/15 { border-color: color-mix(in srgb, var(--primary) 15%, transparent); }
.border-primary\/20 { border-color: color-mix(in srgb, var(--primary) 20%, transparent); }
.border-accent { border-color: var(--accent); }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-150 { border-color: #eceff1; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-200\/60 { border-color: rgba(229, 231, 235, 0.6); }

.divide-y > :not([hidden]) ~ :not([hidden]) { border-top-width: 1px; }
.divide-gray-150 > :not([hidden]) ~ :not([hidden]) { border-color: #eceff1; }

/* Radii */
.rounded-none { border-radius: 0px; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow-2xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03); }
.shadow-xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-sm { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }

/* Positioning */
.relative { position: relative; }
.sticky { position: sticky; }
.top-0 { top: 0px; }
.top-24 { top: 6rem; }
.z-10 { z-index: 10; }
.z-30 { z-index: 30; }

/* Interactive Hover States */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }

.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-50\/70:hover { background-color: rgba(249, 250, 251, 0.7); }
.hover\:bg-gray-50\/80:hover { background-color: rgba(249, 250, 251, 0.8); }
.hover\:bg-primary:hover { background-color: var(--primary); }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-white:hover { color: #ffffff; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:border-primary:hover { border-color: var(--primary); }
.hover\:border-primary\/50:hover { border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.hover\:shadow-sm:hover { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.hover\:translate-x-1:hover { transform: translateX(0.25rem); }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:opacity-90:hover { opacity: 0.9; }

/* Group Hover Helpers */
.group:hover .group-hover\:text-primary { color: var(--primary); }
.group:hover .group-hover\:bg-primary { background-color: var(--primary); }
.group:hover .group-hover\:text-white { color: #ffffff; }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }
.group:hover .group-hover\:underline { text-decoration: underline; }

/* Details / Summary */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; cursor: pointer; user-select: none; }
details[open] summary .group-open\:rotate-180 { transform: rotate(180deg); }
details[open] summary .group-open\:text-primary { color: var(--primary); }
details[open].open\:shadow-xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

/* Prose Styles */
.prose-custom h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--bodytext);
    border-bottom: 2px solid color-mix(in srgb, var(--primary) 20%, transparent);
    padding-bottom: 0.35rem;
}
.prose-custom h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--bodytext);
}
.prose-custom p {
    margin-bottom: 1.1rem;
    line-height: 1.75;
}
.prose-custom ul, .prose-custom ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    line-height: 1.7;
}
.prose-custom ul { list-style-type: disc; }
.prose-custom ol { list-style-type: decimal; }
.prose-custom li { margin-bottom: 0.35rem; }
.prose-custom blockquote {
    border-left: 4px solid var(--primary);
    font-style: italic;
    margin: 1.5rem 0;
    color: var(--mutedtext);
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Responsive Media Queries */
@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:flex-row { flex-direction: row; }
    .sm\:items-center { align-items: center; }
    .sm\:h-20 { height: 5rem; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:p-6 { padding: 1.5rem; }
    .sm\:p-8 { padding: 2rem; }
    .sm\:p-10 { padding: 2.5rem; }
    .sm\:text-sm { font-size: 0.875rem; }
    .sm\:text-base { font-size: 1rem; }
    .sm\:text-lg { font-size: 1.125rem; }
    .sm\:text-2xl { font-size: 1.5rem; }
    .sm\:text-3xl { font-size: 1.875rem; }
    .sm\:text-4xl { font-size: 2.25rem; }
    .sm\:gap-4 { gap: 1rem; }
    .sm\:gap-6 { gap: 1.5rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:mt-0 { margin-top: 0; }
    .sm\:inline-flex { display: inline-flex; }
    .sm\:max-w-none { max-width: none; }
}

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .lg\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
    .lg\:p-10 { padding: 2.5rem; }
    .lg\:text-4xl { font-size: 2.25rem; }
    .lg\:text-5xl { font-size: 3rem; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
    .lg\:order-1 { order: 1; }
    .lg\:order-2 { order: 2; }
    .lg\:space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
}
