/* Scenarios pages — self-contained styles (replaces Tailwind CDN) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #fff; font-family: Inter, system-ui, sans-serif; color: #111827; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { font-weight: 600; }
img, svg { display: inline-block; vertical-align: middle; }

/* Layout */
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.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; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.pb-3 { padding-bottom: 0.75rem; }

/* Margin */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.ml-4 { margin-left: 1rem; }

/* Flexbox */
.flex { display: flex; }
.inline-block { display: inline-block; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
}

/* Typography */
.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-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tracking-tight { letter-spacing: -0.025em; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }

/* Colors */
.text-white { color: #fff; }
.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-gray-900 { color: #111827; }
.text-brand-600 { color: #047857; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-red-700 { color: #b91c1c; }

/* Backgrounds */
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-red-50 { background-color: #fef2f2; }
.bg-brand-600 { background-color: #047857; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.from-emerald-50 { --tw-gradient-from: #ecfdf5; --tw-gradient-to: #ecfdf5; }
.to-green-50 { --tw-gradient-to: #f0fdf4; }

/* Borders */
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-amber-200 { border-color: #fde68a; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

/* Header */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.backdrop-blur-sm { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.8); }

/* Hover states */
a.rounded-xl:hover, a.rounded-lg:hover { border-color: #6ee7b7; background-color: #ecfdf5; }
a.bg-brand-600:hover { background-color: #065f46; }
footer a:hover, nav a:hover, .hover\:text-gray-700:hover { color: #374151; }
header > div > a:last-child:hover { color: #111827; }

/* Transitions */
a { transition: color 0.15s, background-color 0.15s, border-color 0.15s; }

/* Details/FAQ */
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.2s; }
.space-y-2 > * + * { margin-top: 0.5rem; }

/* Guides-specific */
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.max-w-none { max-width: none; }
.list-disc { list-style-type: disc; }
.pl-5 { padding-left: 1.25rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.italic { font-style: italic; }
a.group:hover h2 { color: #047857; }
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Utility */
.h-4 { height: 1rem; }
.w-4 { width: 1rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.font-semibold { font-weight: 600; }

/* ── Widget styles ──────────────────────────────────────────── */
.widget-box { border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.25rem; margin-bottom: 2rem; background: #fff; }
.widget-heading { font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: 1rem; }

.widget-input { width: 100%; border: 1.5px solid #d1d5db; border-radius: 0.5rem; padding: 0.625rem 0.75rem; font-size: 1rem; font-family: inherit; color: #111827; outline: none; transition: border-color 0.15s; }
.widget-input:focus { border-color: #10b981; }
.widget-select { width: 100%; border: 1.5px solid #d1d5db; border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-family: inherit; color: #111827; background: #fff; outline: none; }

.bill-gauge { height: 0.75rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; margin: 0.75rem 0; }
.bill-gauge-fill { height: 100%; border-radius: 9999px; transition: width 0.3s ease, background-color 0.3s; }

.widget-result { padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; margin-top: 0.75rem; display: none; }
.widget-result.visible { display: block; }
.widget-result-green { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.widget-result-amber { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.widget-result-red { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.seg-group { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.seg-btn { padding: 0.375rem 0.875rem; border: 1.5px solid #d1d5db; border-radius: 0.5rem; font-size: 0.875rem; font-family: inherit; cursor: pointer; background: #fff; color: #374151; transition: all 0.15s; }
.seg-btn:hover { border-color: #10b981; color: #047857; }
.seg-btn-active { border-color: #10b981; background: #ecfdf5; color: #047857; font-weight: 600; }

.widget-slider { width: 100%; accent-color: #10b981; cursor: pointer; }

.state-bar-wrap { margin: 0.375rem 0; }
.state-bar-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: #6b7280; margin-bottom: 0.25rem; }
.state-bar { height: 1.5rem; background: #e5e7eb; border-radius: 0.25rem; overflow: hidden; }
.state-bar-fill { height: 100%; border-radius: 0.25rem; background: #9ca3af; }
.state-bar-highlight .state-bar-fill { background: #10b981; }
.state-bar-highlight .state-bar-label { color: #047857; font-weight: 600; }

.widget-output { background: #f9fafb; border-radius: 0.5rem; padding: 0.875rem 1rem; margin-top: 0.75rem; }
.widget-output-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; padding: 0.25rem 0; }
.widget-output-row + .widget-output-row { border-top: 1px solid #e5e7eb; }
.widget-output-total { font-weight: 700; color: #047857; font-size: 1rem; }

.widget-label { font-size: 0.8125rem; font-weight: 500; color: #374151; margin-bottom: 0.375rem; display: block; }
.widget-field { margin-bottom: 0.875rem; }
.widget-cta { display: inline-block; margin-top: 0.75rem; background: #047857; color: #fff; padding: 0.5rem 1.25rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; transition: background 0.15s; }
.widget-cta:hover { background: #065f46; color: #fff; }
