.index-as-table table {
  white-space: nowrap;
  white-space-collapse: collapse;
  text-wrap-mode: nowrap;
}

a {
  text-decoration: none;
}

/* Tighten index row height slightly (10-15% reduction). */
.index-as-table .data-table :where(tbody>tr>td),
table.index_table tbody tr td {
  padding: 0.675rem 0.55rem;
}

:root[data-index-density="compact"] .index-as-table .data-table :where(thead>tr>th),
:root[data-index-density="compact"] table.index_table thead tr th {
  padding: 0.5rem 0.45rem;
}

:root[data-index-density="compact"] .index-as-table .data-table :where(tbody>tr>td),
:root[data-index-density="compact"] table.index_table tbody tr td {
  padding: 0.45rem 0.45rem;
}

.form-table.has_many .has-many-fields .input:last-child {
  margin-bottom: 0 !important;
}

/* Smaller pagination info text. */
.pagination-information,
.paginated-collection-footer {
  font-size: 0.875rem;
}

.dark .pagination-information,
.dark .paginated-collection-footer {
  font-size: 0.875rem;
}

/* Product UI paginator styling for default Kaminari markup. */
body[data-product-controller] nav.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

body[data-product-controller] nav.pagination > span,
body[data-product-controller] nav.pagination > a {
  display: inline-flex;
}

body[data-product-controller] nav.pagination a,
body[data-product-controller] nav.pagination .current,
body[data-product-controller] nav.pagination .gap,
body[data-product-controller] nav.pagination .disabled {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  background: #ffffff;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

body[data-product-controller] nav.pagination a:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
}

body[data-product-controller] nav.pagination a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body[data-product-controller] nav.pagination .current {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body[data-product-controller] nav.pagination .gap {
  min-width: auto;
  padding: 0 0.5rem;
  border-style: dashed;
  background: transparent;
  color: #9ca3af;
  box-shadow: none;
}

body[data-product-controller] nav.pagination .disabled {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
}

.dark body[data-product-controller] nav.pagination a,
.dark body[data-product-controller] nav.pagination .gap,
.dark body[data-product-controller] nav.pagination .disabled {
  border-color: #374151;
  background: #111827;
  color: #d1d5db;
  box-shadow: none;
}

.dark body[data-product-controller] nav.pagination a:hover {
  border-color: #60a5fa;
  background: #1f2937;
  color: #ffffff;
}

.dark body[data-product-controller] nav.pagination .current {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #111827;
}

.dark body[data-product-controller] nav.pagination .gap {
  border-color: transparent;
  background: transparent;
  color: #6b7280;
}

.dark body[data-product-controller] nav.pagination .disabled {
  border-color: #1f2937;
  background: #0f172a;
  color: #6b7280;
}

@media (max-width: 640px) {
  body[data-product-controller] nav.pagination {
    gap: 0.375rem;
  }

  body[data-product-controller] nav.pagination a,
  body[data-product-controller] nav.pagination .current,
  body[data-product-controller] nav.pagination .gap,
  body[data-product-controller] nav.pagination .disabled {
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Consistent action button styling (Stripe-like) */
.action-item-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  /* background: #ffffff; */
  /* color: #111827; */
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.action-item-button:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
  text-decoration: none;
}

.action-item-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.action-item-button:disabled,
.action-item-button.disabled,
.action-item-button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.action-item-button--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.action-item-button--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.action-item-button--secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.action-item-button--danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.action-item-button--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.action-item-button--success {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.action-item-button--success:hover {
  background: #15803d;
  border-color: #15803d;
  color: #ffffff;
}

.batch-actions-dropdown-menu {
  z-index: 50 !important;
}

/* Floating batch action bar (Jira-style) */
.floating-batch-bar {
  opacity: 0;
  transform: translateX(-50%) translateY(1.5rem);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}
.floating-batch-bar::-webkit-scrollbar {
  display: none;
}
.floating-batch-bar > * {
  flex-shrink: 0;
}
@media (max-width: 1279px) {
  .floating-batch-bar.fixed {
    bottom: 5rem;
  }
}
.floating-batch-bar--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.batch-actions-dropdown-menu a[data-icon]::before {
  font-family: "Material Symbols Outlined";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  content: attr(data-icon);
  display: inline-flex;
  margin-right: 0.5rem;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

.tabs.tabs--vertical {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

.tabs.tabs--vertical .tabs-nav {
  width: 14rem;
  min-width: 14rem;
  margin-bottom: 0;
  flex-direction: column;
  flex-wrap: nowrap;
  border-bottom-width: 0;
  border-right-width: 1px;
  text-align: left;
}

.tabs.tabs--vertical .tabs-nav > a {
  width: 100%;
  border-bottom-width: 0;
  border-right-width: 2px;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0;
  padding: 0.75rem 1rem;
}

.tabs.tabs--vertical .tabs-content {
  flex: 1 1 0%;
  width: 0;
  max-width: 100%;
  min-width: 0;
  padding-top: 0;
}

.tabs.tabs--vertical .tabs-content > [role="tabpanel"] {
  width: 100%;
}

@media (max-width: 767px) {
  .tabs.tabs--vertical {
    display: block;
  }

  .tabs.tabs--vertical .tabs-nav {
    width: auto;
    min-width: 0;
    margin-bottom: 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    border-right-width: 0;
    border-bottom-width: 1px;
    text-align: center;
  }

  .tabs.tabs--vertical .tabs-nav > a {
    width: auto;
    border-right-width: 0;
    border-bottom-width: 2px;
    border-top-right-radius: 0.375rem;
    border-bottom-left-radius: 0;
  }

  .tabs.tabs--vertical .tabs-content {
    padding-top: 1rem;
  }
}

/* Hide hidden inputs completely so they don't take space */
.form-table.has_many .has-many-fields .input.hidden,
.form-table.has_many .has-many-fields .input input[type="hidden"] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin-right: 1rem !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Essential CSS for horizontal row layout */
.form-table.has_many .has-many-fields {
  display: flex !important;
  align-items: flex-start !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 1rem !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  margin-bottom: 0.25rem !important;
  padding: 1rem !important;
}

.form-table.has_many .has-many-fields .input {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 120px !important;
  margin-right: 1rem !important;
  padding: 0 !important;
  vertical-align: top !important;
}

/* Hide labels in all rows except the first (header) */
.form-table.has_many .has-many-fields .input:not(.boolean) label {
  display: none !important;
}

/* Show labels only in the first row (header) */
.form-table.has_many .has-many-fields:first-child .input label {
  display: block !important;
  color: #374151 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em !important;
}



.form-table.has_many .has-many-fields{
  margin: 0;
}
/* Ensure inputs are properly sized for horizontal layout */
.form-table.has_many .has-many-fields .input input:not([type="checkbox"]),
.form-table.has_many .has-many-fields .input select,
.form-table.has_many .has-many-fields .input textarea {
  width: auto !important;
  min-width: 120px !important;
  max-width: 200px !important;
  display: inline-block !important;
  margin: 0 !important;
}

/* Force horizontal layout for all has-many fields */
.form-table.has_many .has-many-fields {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  /* overflow-x: auto !important; */
}

/* Remove the debug borders now that layout is working */
.form-table.has_many .has-many-fields {
  border: 1px solid #e5e7eb !important;
}

.form-table.has_many .has-many-fields .input {
  border: none !important;
}

/* Form grid layout for regular form inputs */
.form-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 1rem !important;
  align-items: start !important;
}

/* Right-aligned form section with inline labels */
.align-end.inputs {
  text-align: right !important;
  justify-content: flex-end !important;
}

.align-end.inputs ol {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 0.25rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.align-end.inputs .input {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.5rem !important;
  width: auto !important;
  min-width: 200px !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

.align-end.inputs .input label {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  min-width: 120px !important;
  text-align: right !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
}

.align-end.inputs .input input,
.align-end.inputs .input select,
.align-end.inputs .input textarea {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  text-align: right !important;
}

/* Override ActiveAdmin's default form layout */
.form-grid.inputs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 1rem !important;
}

.form-grid.inputs .input {
  float: none !important;
  width: auto !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}

/* Target the ol element that ActiveAdmin uses to wrap inputs */
.form-grid ol,
.form-grid.inputs ol {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 1rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.form-grid ol li,
.form-grid.inputs ol li {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Responsive adjustments for form grid */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .form-grid .input {
    padding: 0.5rem !important;
  }
}

/* Clean header styling for the first row */
.form-table.has_many .has-many-fields:nth-of-type(1) {
  background: transparent !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
  padding: 1rem !important;
  margin-bottom: 0.25rem !important;
  border-radius: 0.5rem !important;
}

.form-table.has_many .has-many-fields:nth-of-type(1) .input label,
.form-table.has_many .has-many-fields:nth-of-type(1) .input .label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Alternative selector for compatibility */
.form-table.has_many .has-many-fields:first-of-type {
  background: transparent !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
  padding: 1rem !important;
  margin-bottom: 0.25rem !important;
  border-radius: 0.5rem !important;
}

.form-table.has_many .has-many-fields:first-of-type .input label,
.form-table.has_many .has-many-fields:first-of-type .input .label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Debug: Add a border to see the first row clearly */
.form-table.has_many .has-many-fields:first-child {
  border: 1px solid #e5e7eb !important;
}

/* Debug: Add border to see the layout */
.form-table.has_many .has-many-fields {
  border: 1px solid #e5e7eb !important;
}

.form-table.has_many .has-many-fields .input {
  border: none !important;
}
fieldset.has-many-fields {
  overflow: visible !important;
}

/** Restrict form width for professional appearance */
/* Default form background */
/* .formtastic:not(.payment, .form-settings, .purchase_order, .quote, .sales_order, .invoice, .transaction, .repayment_schedule, .journal_entry) {
  max-width: 700px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: white !important;
  padding: 2rem !important;
  border-radius: 0.5rem !important; 
  border-width: 2px;
} */

/* Dark mode support using :where(.dark, .dark *) selector */
.formtastic:not(.purchase_order, .quote, .sales_order, .invoice, .transaction, .repayment_schedule):where(.dark, .dark *) {
  background: #23272f !important;
  color: #f3f4f6 !important;
}

/* Semantic Errors Caption Styling */
.semantic-errors-container {
  margin-bottom: 1.5rem !important;
  padding: 1rem !important;
  background-color: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  border-radius: 0.5rem !important;
  border-left: 4px solid #ef4444 !important;
}

.semantic-errors-caption {
  color: #dc2626 !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin: 0 0 0.75rem 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}

.semantic-errors-container .errors {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.semantic-errors-container .errors li {
  color: #dc2626 !important;
  font-size: 0.875rem !important;
  margin-bottom: 0.25rem !important;
  padding-left: 1rem !important;
  position: relative !important;
}

.semantic-errors-container .errors li:before {
  content: "•" !important;
  color: #ef4444 !important;
  font-weight: bold !important;
  position: absolute !important;
  left: 0 !important;
}

/* Dark mode support for semantic errors */
:where(.dark, .dark *) .semantic-errors-container {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  border-left-color: #ef4444 !important;
}

:where(.dark, .dark *) .semantic-errors-caption {
  color: #fca5a5 !important;
}

:where(.dark, .dark *) .semantic-errors-container .errors li {
  color: #fca5a5 !important;
}

.right-align,
[data-column="net_amount"],
[data-column="amount"],
[data-column="debit"],
[data-column="credit"],
[data-column="debit_ccy"],
[data-column="credit_ccy"] {
  text-align: right !important;
}
.marker {
  background-color: #f0f0f0 !important;
}
.marker:where(.dark, .dark *) {
  background-color: #374151 !important;
}
.marker:where(.dark, .dark *):hover {
  background-color: #1e293b !important;
}

[data-status="posted"] {
  color: white !important;
  background-color: #16a34a !important; /* Tailwind's green-600 */
}
[data-status="posted"]:where(.dark, .dark *) {
  color: white !important;
  background-color: #16a34a !important; /* Tailwind's green-600 */
}
/* panel fullscreen */
.panel.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: white;
   overflow: auto;
}

/* Customer Balance Display Styling */
.balance-display {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.badge {
  display: inline-block !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  vertical-align: baseline !important;
  border-radius: 0.375rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.025em !important;
}

.badge-lg {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
}

.badge-warning {
  color: #92400e !important;
  background-color: #fef3c7 !important;
  border: 1px solid #f59e0b !important;
}

.badge-success {
  color: #065f46 !important;
  background-color: #d1fae5 !important;
  border: 1px solid #10b981 !important;
}

.badge-danger {
  color: #991b1b !important;
  background-color: #fee2e2 !important;
  border: 1px solid #ef4444 !important;
}

.text-muted {
  color: #6b7280 !important;
  font-size: 0.875rem !important;
}

/* Dark mode support for balance display */
:where(.dark, .dark *) .badge-warning {
  color: #fbbf24 !important;
  background-color: #451a03 !important;
  border-color: #f59e0b !important;
}

:where(.dark, .dark *) .badge-success {
  color: #34d399 !important;
  background-color: #064e3b !important;
  border-color: #10b981 !important;
}

:where(.dark, .dark *) .badge-danger {
  color: #fca5a5 !important;
  background-color: #7f1d1d !important;
  border-color: #ef4444 !important;
}

:where(.dark, .dark *) .text-muted {
  color: #9ca3af !important;
}

/* Remove list bullets from transaction forms */
.transaction > li {
  list-style: none !important;
}

.transaction li {
  list-style: none !important;
}

.transaction .inputs {
  list-style: none !important;
}

.transaction .inputs li {
  list-style: none !important;
}

/* Chat Message Styles */
.user-bubble {
  @apply ml-auto max-w-[85%] mb-4;
  @apply bg-blue-600 text-white rounded-2xl rounded-tr-none px-4 py-3;
  @apply shadow-sm;
}

.system-bubble {
  @apply mr-auto max-w-[85%] mb-4;
  @apply bg-white dark:bg-gray-700 text-gray-900 dark:text-white;
  @apply rounded-2xl rounded-tl-none px-4 py-3 border border-gray-200 dark:border-gray-600;
  @apply shadow-sm;
}

.message {
  @apply break-words;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading indicator styles */
.loading-indicator {
  @apply flex items-center space-x-2 text-gray-600 dark:text-gray-400 italic;
}

/* In-chat form container */
.in-chat-form-container {
  @apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-4 my-2;
  @apply border border-gray-200 dark:border-gray-600;
}

/* Hide filter containers by default to prevent flash on page load */
/* JavaScript will remove the hiding once initial state is applied */
/* Target specific filter container selectors used by the JavaScript */
/* #filters_sidebar_section,
.sidebar_section,
.filters,
.filter_form {
  display: none !important;
} */

/* Hide .space-y-8 elements that are filter containers (within sidebar/filter contexts) */
/* Note: The JS also selects standalone .space-y-8, but we only hide them in filter contexts */
/* to avoid breaking other layout elements that use this Tailwind utility class */
/* #filters_sidebar_section .space-y-8,
.sidebar_section .space-y-8,
.filters .space-y-8,
.filter_form .space-y-8 {
  display: none !important;
} */

/* Prevent brief flash of filter container wrappers before JS marks ready */
/* body:not(.filters-ready) .main-content-container .space-y-8 {
  display: none !important;
} */

/* As a fallback, hide any standalone .space-y-8 until filters are ready */
/* body:not(.filters-ready) .space-y-8 {
  display: none !important;
} */

/* When filters are ready, allow them to render normally */
/* body.filters-ready #filters_sidebar_section,
body.filters-ready .sidebar_section,
body.filters-ready .filters,
body.filters-ready .filter_form,
body.filters-ready #filters_sidebar_section .space-y-8,
body.filters-ready .sidebar_section .space-y-8,
body.filters-ready .filters .space-y-8,
body.filters-ready .filter_form .space-y-8 {
  display: block !important;
} */

/* Restore standalone space-y-8 once ready */
/*body.filters-ready .space-y-8 {
  display: block !important;
} */

/* Modern styling enhancements for Tom Select dropdowns */
.ts-dropdown {
  border-radius: 0.5rem !important;
  border: 1px solid rgba(209, 213, 219, 0.8) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  margin-top: 0.5rem !important;
  background: #ffffff !important;
  overflow: hidden;
  transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
  z-index: 9999 !important;
}

/* Dark mode support for dropdown */
.dark .ts-dropdown {
  background: #1f2937 !important;
  border-color: rgba(75, 85, 99, 0.8) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2) !important;
}

/* Modern dropdown content styling */
.ts-dropdown-content {
  max-height: 300px !important;
  padding: 0.25rem !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.ts-dropdown-content::-webkit-scrollbar {
  width: 8px;
}

.ts-dropdown-content::-webkit-scrollbar-track {
  background: transparent;
}

.ts-dropdown-content::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 4px;
}

.ts-dropdown-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(156, 163, 175, 0.7);
}

.dark .ts-dropdown-content::-webkit-scrollbar-thumb {
  background-color: rgba(75, 85, 99, 0.5);
}

.dark .ts-dropdown-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(75, 85, 99, 0.7);
}

/* Modern option styling */
.ts-dropdown .option {
  padding: 0.625rem 0.875rem !important;
  margin: 0.125rem 0 !important;
  border-radius: 0.375rem !important;
  transition: all 0.15s ease-in-out !important;
  cursor: pointer;
  color: #374151 !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
}

.dark .ts-dropdown .option {
  color: #e5e7eb !important;
}

/* Hover state for options */
.ts-dropdown [data-selectable].option:hover {
  background-color: #f3f4f6 !important;
  color: #111827 !important;
  transform: translateX(2px);
}

.dark .ts-dropdown [data-selectable].option:hover {
  background-color: #374151 !important;
  color: #f9fafb !important;
}

/* Active/selected option styling */
.ts-dropdown .active {
  background-color: #eff6ff !important;
  color: #1e40af !important;
  font-weight: 500 !important;
}

.dark .ts-dropdown .active {
  background-color: #1e3a8a !important;
  color: #dbeafe !important;
}

/* Focus state for keyboard navigation */
.ts-dropdown [data-selectable].option:focus {
  outline: none;
  background-color: #eff6ff !important;
  color: #1e40af !important;
}

.dark .ts-dropdown [data-selectable].option:focus {
  background-color: #1e3a8a !important;
  color: #dbeafe !important;
}

/* Highlighted search text */
.ts-dropdown [data-selectable] .highlight {
  background: rgba(59, 130, 246, 0.3) !important;
  border-radius: 0.125rem !important;
  padding: 0.125rem 0.25rem !important;
  font-weight: 600 !important;
}

.dark .ts-dropdown [data-selectable] .highlight {
  background: rgba(96, 165, 250, 0.3) !important;
  color: #dbeafe !important;
}

/* Disabled options */
.ts-dropdown [data-disabled],
.ts-dropdown [data-disabled] [data-selectable].option {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background-color: transparent !important;
}

/* Optgroup headers */
.ts-dropdown .optgroup-header {
  padding: 0.75rem 0.875rem 0.5rem !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #6b7280 !important;
  background: #f9fafb !important;
  border-bottom: 1px solid #e5e7eb !important;
  margin-top: 0.5rem !important;
}

.dark .ts-dropdown .optgroup-header {
  color: #9ca3af !important;
  background: #111827 !important;
  border-bottom-color: #374151 !important;
}

.ts-dropdown .optgroup:first-child .optgroup-header {
  margin-top: 0 !important;
  border-top: none !important;
}

/* No results message */
.ts-dropdown .no-results {
  padding: 1rem 0.875rem !important;
  color: #6b7280 !important;
  font-size: 0.875rem !important;
  text-align: center !important;
}

.dark .ts-dropdown .no-results {
  color: #9ca3af !important;
}

/* Create option styling */
.ts-dropdown .create {
  padding: 0.625rem 0.875rem !important;
  color: #3b82f6 !important;
  font-weight: 500 !important;
  border-radius: 0.375rem !important;
  margin: 0.125rem 0 !important;
}

.ts-dropdown .create:hover {
  background-color: #eff6ff !important;
}

.dark .ts-dropdown .create {
  color: #60a5fa !important;
}

.dark .ts-dropdown .create:hover {
  background-color: #1e3a8a !important;
}

.ts-dropdown .active.create {
  background-color: #eff6ff !important;
  color: #1e40af !important;
}

.dark .ts-dropdown .active.create {
  background-color: #1e3a8a !important;
  color: #dbeafe !important;
}

/* Control input styling improvements */
/* Ensure ts-wrapper has no border to prevent double border issue */
.ts-wrapper {
  border: none !important;
  outline: none !important;
  padding: 0 !important;
}

/* Remove Tailwind padding classes from ts-wrapper */
.ts-wrapper.px-3,
.ts-wrapper.py-2,
.ts-wrapper.px-3.py-2,
.ts-wrapper[class*="px-"],
.ts-wrapper[class*="py-"] {
  padding: 0 !important;
}

/* Hide the original select when TomSelect takes over */
.ts-hidden-accessible {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  -webkit-clip-path: inset(50%) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}

/* Ensure original select element inside wrapper has no border */
.ts-wrapper select {
  border: none !important;
  outline: none !important;
}

.ts-control {
  border-radius: 0.5rem !important;
  border: 1px solid #d1d5db !important;
  transition: all 0.15s ease-in-out !important;
  background: #ffffff !important;
  margin: 0 !important;
}

.ts-control:hover {
  border-color: #9ca3af !important;
}

.ts-wrapper.focus .ts-control {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

.dark .ts-control {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

.dark .ts-control:hover {
  border-color: #6b7280 !important;
}

.dark .ts-wrapper.focus .ts-control {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
}

.ts-wrapper.signup-country-select {
  width: 100%;
}

.ts-wrapper.signup-country-select .ts-control {
  align-items: center !important;
  flex-wrap: nowrap !important;
  min-height: 3rem !important;
  padding: 0.75rem 1rem !important;
}

.ts-wrapper.signup-country-select .ts-control > input {
  width: 0 !important;
  min-width: 0 !important;
  flex: 0 0 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -10000px !important;
}

.ts-wrapper.signup-country-select .ts-control > .item,
.ts-wrapper.signup-country-select .ts-control > div {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5rem !important;
}

.ts-wrapper.signup-country-select .ts-dropdown {
  margin-top: 0.25rem !important;
}

/* Multi-select item styling */
.ts-wrapper.multi .ts-control > div {
  border-radius: 0.375rem !important;
  padding: 0.25rem 0.5rem !important;
  margin: 0.125rem 0.25rem 0.125rem 0 !important;
  background: #eff6ff !important;
  color: #1e40af !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  border: 1px solid #bfdbfe !important;
  transition: all 0.15s ease-in-out !important;
}

.ts-wrapper.multi .ts-control > div:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}

.ts-wrapper.multi .ts-control > div.active {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}

.dark .ts-wrapper.multi .ts-control > div {
  background: #1e3a8a !important;
  color: #dbeafe !important;
  border-color: #3b82f6 !important;
}

.dark .ts-wrapper.multi .ts-control > div:hover,
.dark .ts-wrapper.multi .ts-control > div.active {
  background: #1e40af !important;
  border-color: #60a5fa !important;
}

/* Loading spinner styling */
.ts-dropdown .spinner {
  margin: 1rem auto !important;
}

.ts-dropdown .spinner::after {
  border-color: #3b82f6 transparent #3b82f6 transparent !important;
}

.dark .ts-dropdown .spinner::after {
  border-color: #60a5fa transparent #60a5fa transparent !important;
}

/* Dropdown input plugin styling */
.plugin-dropdown_input .dropdown-input {
  border-color: #e5e7eb !important;
  padding: 0.75rem !important;
  font-size: 0.875rem !important;
  border-radius: 0 !important;
}

.dark .plugin-dropdown_input .dropdown-input {
  background: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #4b5563 !important;
}

.plugin-dropdown_input .dropdown-input:focus {
  outline: none;
  border-color: #3b82f6 !important;
}

.dark .plugin-dropdown_input .dropdown-input:focus {
  border-color: #60a5fa !important;
}

/* Column visibility is managed by ColumnPicker JS to avoid initial flicker. */
html.column-picker-loading table.index_table,
html.column-picker-loading #index_table,
html.column-picker-loading div.index_as_table table,
html.column-picker-loading div.index-as-table table,
html.column-picker-loading .index-as-table table,
html.column-picker-loading table[class*="index"],
html.column-picker-loading .paginated_collection table,
html.column-picker-loading div.paginated_collection table {
  visibility: hidden;
}

.column-picker-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -12px 0 24px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 70;
  display: flex;
  flex-direction: column;
}

.column-picker-drawer.is-open {
  transform: translateX(0);
}

.column-picker-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 60;
}

.column-picker-backdrop-visible {
  opacity: 1;
}

body.column-picker-drawer-open {
  overflow: hidden;
}

.column-picker-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.column-picker-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
}

.column-picker-drawer-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.column-picker-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.column-picker-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.column-picker-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #6b7280;
}

.column-picker-density-toggle {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.column-picker-density-option {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
}

.column-picker-density-option.is-active {
  background: #2563eb;
  color: #ffffff;
}

.column-picker-groupby {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.column-picker-groupby-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.column-picker-groupby-option:hover {
  background: #f3f4f6;
  color: #111827;
}

.column-picker-groupby-option.is-active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.column-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 360px;
  overflow-y: auto;
}

.column-picker-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid #e5e7eb;
}

.column-picker-action-button {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.column-picker-action-button:hover {
  background: #e5e7eb;
}

.dark .column-picker-drawer {
  background: #111827;
  border-color: #1f2937;
}

.dark .column-picker-drawer-header,
.dark .column-picker-actions {
  border-color: #1f2937;
}

.dark .column-picker-drawer-close {
  border-color: #1f2937;
  background: #111827;
  color: #9ca3af;
}

.dark .column-picker-drawer-close:hover {
  background: #1f2937;
  color: #e5e7eb;
}

.dark .column-picker-section-label {
  color: #9ca3af;
}

.dark .column-picker-density-toggle {
  background: #1f2937;
  border-color: #374151;
}

.dark .column-picker-density-option {
  color: #9ca3af;
}

.dark .column-picker-density-option.is-active {
  background: #3b82f6;
  color: #ffffff;
}

.dark .column-picker-groupby-option {
  background: #111827;
  border-color: #374151;
  color: #e5e7eb;
}

.dark .column-picker-groupby-option:hover {
  background: #1f2937;
  color: #ffffff;
}

.dark .column-picker-groupby-option.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.dark .column-picker-action-button {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}

.dark .column-picker-action-button:hover {
  background: #374151;
}

html.column-picker-loading .paginated_collection {
  position: relative;
  min-height: 220px;
  display: block;
}

html.column-picker-loading .index_as_table,
html.column-picker-loading .index-as-table {
  position: relative;
  min-height: 220px;
  display: block;
}

html.column-picker-loading .paginated_collection::after,
html.column-picker-loading .index_as_table::after,
html.column-picker-loading .index-as-table::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.5rem;
  background-color: #f8fafc;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.6) 25%, rgba(241, 245, 249, 0.9) 37%, rgba(226, 232, 240, 0.6) 63%) 0 0 / 300% 100%,
    linear-gradient(#e2e8f0, #e2e8f0) 0 0 / 100% 1px,
    repeating-linear-gradient(#e2e8f0, #e2e8f0 1px, transparent 1px, transparent 36px) 0 40px / 100% calc(100% - 40px);
  opacity: 1;
  animation: column-picker-skeleton 1.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes column-picker-skeleton {
  0% {
    background-position: 0% 0, 0 0, 0 40px;
  }
  100% {
    background-position: 100% 0, 0 0, 0 40px;
  }
}

table.column-picker-loading th.default-hidden-column,
table.column-picker-loading td.default-hidden-column,
table.column-picker-loading thead th.col-net_amount,
table.column-picker-loading thead th.col-vat_rate,
table.column-picker-loading thead th.col-invoice_vat_amount,
table.column-picker-loading thead th.col-ccy,
table.column-picker-loading tbody td.col-net_amount,
table.column-picker-loading tbody td.col-vat_rate,
table.column-picker-loading tbody td.col-invoice_vat_amount,
table.column-picker-loading tbody td.col-ccy {
  display: none !important;
}

/* Single-line truncation with tooltip for index table cells */
table.index_table td {
  overflow: hidden; /* Ensures truncation works in table cells */
}

table.index_table td .truncate {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0; /* Allows flex items to shrink below their content size */
}

div[role="toolbar"].scopes {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

div[role="toolbar"].scopes .index-button-group.scope-dropdown-hidden {
  display: none !important;
}

div[role="toolbar"].scopes .aa-scope-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
}

div[role="toolbar"].scopes .aa-scope-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

div[role="toolbar"].scopes .aa-scope-trigger:hover,
div[role="toolbar"].scopes .aa-scope-dropdown.is-open .aa-scope-trigger {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111827;
}

div[role="toolbar"].scopes .aa-scope-trigger .scopes-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.375rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  color: #374151;
  font-size: 0.75rem;
}

div[role="toolbar"].scopes .aa-scope-caret {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  display: inline-block;
  margin-left: 0.15rem;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

div[role="toolbar"].scopes .aa-scope-dropdown.is-open .aa-scope-caret {
  transform: rotate(-135deg);
  opacity: 0.9;
}

div[role="toolbar"].scopes .aa-scope-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 12rem;
  padding: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

div[role="toolbar"].scopes .aa-scope-dropdown.is-open .aa-scope-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

div[role="toolbar"].scopes .aa-scope-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

div[role="toolbar"].scopes .aa-scope-item:hover {
  background: #f3f4f6;
  color: #111827;
}

div[role="toolbar"].scopes .aa-scope-item.is-active {
  background: #2563eb;
  color: #ffffff;
}

div[role="toolbar"].scopes .aa-scope-item .scopes-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.375rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  color: inherit;
  font-size: 0.75rem;
}

div[role="toolbar"].scopes .aa-scope-item.is-active .scopes-count {
  background: rgba(255, 255, 255, 0.25);
}

div[role="toolbar"].scopes .aa-scope-group-label {
  padding: 0.35rem 0.65rem 0.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

div[role="toolbar"].scopes .aa-scope-divider {
  height: 1px;
  margin: 0.35rem 0.35rem;
  background: #e5e7eb;
  opacity: 0.7;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-trigger {
  border-color: #374151;
  background: #111827;
  color: #e5e7eb;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-trigger:hover,
:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-dropdown.is-open .aa-scope-trigger {
  background: #1f2937;
  border-color: #4b5563;
  color: #ffffff;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-trigger .scopes-count {
  background: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-menu {
  border-color: #374151;
  background: #111827;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.35);
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-group-label {
  color: #94a3b8;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-divider {
  background: #374151;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-item {
  color: #d1d5db;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-item:hover {
  background: #1f2937;
  color: #f9fafb;
}

:where(.dark, .dark *) div[role="toolbar"].scopes .aa-scope-item.is-active {
  background: #3b82f6;
  color: #ffffff;
}

/* Audit Trail Collapsible Styles */
.audit-trail-content {
  display: none;
  padding-top: 0.5rem;
}

.audit-trail-content.expanded {
  display: block;
}

.audit-trail-toggle {
  transition: transform 0.2s ease;
}

.audit-trail-toggle.rotated {
  transform: rotate(180deg);
}

/* Description expand-on-hover styles */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-none {
  -webkit-line-clamp: unset;
}

/* Sticky expanded row */
tr.ajax-expand.expanded {
  position: relative;
  border: 2px solid #3b82f6 !important; /* blue-500 */
}

/* Blue border for regular expandable rows when expanded */
tr.expand.expanded {
  border: 2px solid #3b82f6 !important; /* blue-500 */
}

/* Dark mode support for expanded row borders */
.dark tr.ajax-expand.expanded,
:where(.dark, .dark *) tr.ajax-expand.expanded {
  border-color: #60a5fa !important; /* blue-400 for dark mode */
}

.dark tr.expand.expanded,
:where(.dark, .dark *) tr.expand.expanded {
  border-color: #60a5fa !important; /* blue-400 for dark mode */
}

tr.ajax-expand-details {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgb(249 250 251); /* bg-gray-50 */
}

/* Keep expanded row content within visible table width */
.index-as-table .data-table tbody tr.ajax-expand-details td[colspan] {
  white-space: normal;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.index-as-table .data-table tbody tr.ajax-expand-details td[colspan] > * {
  white-space: normal;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.index-as-table .data-table tbody tr.ajax-expand-details td.ajax-expand-cell,
.index-as-table .data-table tbody tr.no_highlight td.ajax-expand-cell {
  padding-left: 0;
  padding-right: 0;
}

.index-as-table .data-table tbody tr.ajax-expand-details .ajax-expand-details-content,
.index-as-table .data-table tbody tr.no_highlight .ajax-expand-details-content {
  position: sticky;
  left: 0;
  right: 0;
  width: min(100%, var(--ajax-expand-max-width, 100%));
  max-width: var(--ajax-expand-max-width, 100%);
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  box-sizing: border-box;
  overflow-x: auto;
}

.index-as-table .data-table tbody tr.ajax-expand-details .ajax-expand-details-content table,
.index-as-table .data-table tbody tr.no_highlight .ajax-expand-details-content table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.index-as-table .data-table tbody tr.ajax-expand-details .ajax-expand-details-content :where(th, td),
.index-as-table .data-table tbody tr.no_highlight .ajax-expand-details-content :where(th, td) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.dark tr.ajax-expand-details {
  background-color: rgb(31 41 55); /* dark:bg-gray-800 */
}

/* Skeleton loader with shimmer effect */
.skeleton-loader {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  min-height: 1em;
  width: 100%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Make the action column (last column) sticky on index pages */
.index-as-table .data-table thead tr th:last-child {
  position: sticky;
  right: 0;
  z-index: 10;
  background-color: rgb(249 250 251); /* bg-gray-50 to match header */
}

.index-as-table .data-table tbody tr td:last-child {
  position: sticky;
  right: 0;
  z-index: 10;
  background-color: rgb(255 255 255); /* white background for body cells */
}

/* Dark mode support for sticky action column */
.dark .index-as-table .data-table thead tr th:last-child,
:where(.dark, .dark *) .index-as-table .data-table thead tr th:last-child {
  background-color: rgba(3, 7, 18, 0.5); /* dark header background */
}

.dark .index-as-table .data-table tbody tr td:last-child,
:where(.dark, .dark *) .index-as-table .data-table tbody tr td:last-child {
  background-color: rgb(17 24 39); /* dark:bg-gray-900 to match row background */
}

/* Add shadow to indicate scrollable content */
.index-as-table .data-table thead tr th:last-child::before,
.index-as-table .data-table tbody tr td:last-child::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

/* Remove shadow in dark mode and replace with dark variant */
.dark .index-as-table .data-table thead tr th:last-child::before,
:where(.dark, .dark *) .index-as-table .data-table thead tr th:last-child::before,
.dark .index-as-table .data-table tbody tr td:last-child::before,
:where(.dark, .dark *) .index-as-table .data-table tbody tr td:last-child::before {
  background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
}

/* Hide "(current view)" text by default, show on row hover */
.total-current-view-hint {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

tr:hover .total-current-view-hint {
  opacity: 1;
}

/* Keyboard navigation focus styling for index table rows */
.index-as-table tbody tr.keyboard-focused {
  outline: 2px solid #3b82f6 !important; /* blue-500 */
  outline-offset: -2px;
  background-color: #eff6ff !important; /* blue-50 */
  box-shadow: 0 0 0 1px #3b82f6 !important;
}

/* Make ActiveAdmin index rows feel clickable when row navigation is enabled */
.index-as-table tbody tr.row-clickable > td,
table.index_table tbody tr.row-clickable > td,
.paginated_collection table tbody tr.row-clickable > td,
table.data-table tbody tr.row-clickable > td {
  cursor: pointer;
}

/* Copy button for flagged cells on index pages */
td.copy-cell {
  position: relative;
  padding-right: 2.25rem;
}

/* Copy button for inline values on show pages */
.copy-cell-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 2.25rem;
}

td.copy-cell .copy-cell-button {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  border-radius: 0.375rem;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease-in-out, color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.copy-cell-inline .copy-cell-button {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  border-radius: 0.375rem;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease-in-out, color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

td.copy-cell:hover .copy-cell-button,
td.copy-cell .copy-cell-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.copy-cell-inline:hover .copy-cell-button,
.copy-cell-inline .copy-cell-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

td.copy-cell .copy-cell-button:hover {
  color: #111827;
  border-color: #d1d5db;
}

.copy-cell-inline .copy-cell-button:hover {
  color: #111827;
  border-color: #d1d5db;
}

td.copy-cell .copy-cell-button .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

.copy-cell-inline .copy-cell-button .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

td.copy-cell .copy-cell-button.copy-cell-button--copied {
  color: #059669;
  border-color: #34d399;
}

.copy-cell-inline .copy-cell-button.copy-cell-button--copied {
  color: #059669;
  border-color: #34d399;
}

.dark td.copy-cell .copy-cell-button,
:where(.dark, .dark *) td.copy-cell .copy-cell-button {
  background: #111827;
  border-color: #374151;
  color: #9ca3af;
}

.dark .copy-cell-inline .copy-cell-button,
:where(.dark, .dark *) .copy-cell-inline .copy-cell-button {
  background: #111827;
  border-color: #374151;
  color: #9ca3af;
}

.dark td.copy-cell .copy-cell-button:hover,
:where(.dark, .dark *) td.copy-cell .copy-cell-button:hover {
  color: #e5e7eb;
  border-color: #4b5563;
}

.dark .copy-cell-inline .copy-cell-button:hover,
:where(.dark, .dark *) .copy-cell-inline .copy-cell-button:hover {
  color: #e5e7eb;
  border-color: #4b5563;
}

.index-as-table tbody tr.row-clickable td.expand,
table.index_table tbody tr.row-clickable td.expand,
.paginated_collection table tbody tr.row-clickable td.expand,
.data-table tbody tr.row-clickable td.expand,
.index-as-table tbody tr.row-clickable td.col-actions,
table.index_table tbody tr.row-clickable td.col-actions,
.paginated_collection table tbody tr.row-clickable td.col-actions,
.data-table tbody tr.row-clickable td.col-actions,
.index-as-table tbody tr.row-clickable td.actions,
table.index_table tbody tr.row-clickable td.actions,
.paginated_collection table tbody tr.row-clickable td.actions,
.data-table tbody tr.row-clickable td.actions,
.index-as-table tbody tr.row-clickable .data-table-resource-actions,
table.index_table tbody tr.row-clickable .data-table-resource-actions,
.paginated_collection table tbody tr.row-clickable .data-table-resource-actions,
.data-table tbody tr.row-clickable .data-table-resource-actions {
  cursor: default;
}

/* Expanded detail rows should not show a pointer cursor */
.index-as-table tbody tr.ajax-expand-details td,
.index-as-table tbody tr.no_highlight td,
table.index_table tbody tr.ajax-expand-details td,
table.index_table tbody tr.no_highlight td,
.paginated_collection table tbody tr.ajax-expand-details td,
.paginated_collection table tbody tr.no_highlight td,
table.data-table tbody tr.ajax-expand-details td,
table.data-table tbody tr.no_highlight td {
  cursor: default;
}

.dark .index-as-table tbody tr.keyboard-focused,
:where(.dark, .dark *) .index-as-table tbody tr.keyboard-focused {
  outline-color: #60a5fa !important; /* blue-400 for dark mode */
  background-color: #1e3a8a !important; /* blue-900 for dark mode */
  box-shadow: 0 0 0 1px #60a5fa !important;
}

/* Ensure focused row is visible above other rows */
.index-as-table tbody tr.keyboard-focused {
  position: relative;
  z-index: 5;
}

/* Row highlighting on back navigation */
.index-as-table tbody tr.highlighted-row {
  outline: 2px solid #3b82f6 !important; /* blue-500 */
  outline-offset: -2px;
  transition: outline 0.2s ease-in;
  position: relative;
  z-index: 10;
}

.dark .index-as-table tbody tr.highlighted-row,
:where(.dark, .dark *) .index-as-table tbody tr.highlighted-row {
  outline-color: #60a5fa !important; /* blue-400 for dark mode */
}

/* Keep date pickers above filter dropdown overlays */
.ui-datepicker,
.ui-datepicker.ui-widget,
.ui-datepicker.ui-widget-content,
.flatpickr-calendar {
  z-index: 10050 !important;
}

/* =========================================================
   ENTERPRISE FINANCIAL UX PATTERNS
   ========================================================= */

/* 1. Sticky table headers (enterprise financial pattern)
   Column headers stay visible when scrolling long financial lists
   so users always know which column they are reading. */
.index-as-table .data-table thead tr th,
table.index_table thead tr th {
  position: sticky;
  top: 0;
  z-index: 15; /* above sticky action column (z-index:10) */
  background-color: rgb(249 250 251); /* bg-gray-50 */
}

.dark .index-as-table .data-table thead tr th,
:where(.dark, .dark *) .index-as-table .data-table thead tr th,
.dark table.index_table thead tr th,
:where(.dark, .dark *) table.index_table thead tr th {
  background-color: rgb(17 24 39); /* dark:bg-gray-900 */
}

/* Bottom border shadow on sticky header to signal scroll position */
.index-as-table .data-table thead tr th {
  box-shadow: 0 1px 0 rgb(229 231 235); /* border-gray-200 equivalent */
}

.dark .index-as-table .data-table thead tr th,
:where(.dark, .dark *) .index-as-table .data-table thead tr th {
  box-shadow: 0 1px 0 rgb(55 65 81); /* dark:border-gray-700 */
}

/* Corner cell: sticky header + sticky action column must both be visible */
.index-as-table .data-table thead tr th:last-child {
  z-index: 20; /* above regular sticky headers */
}

/* Product UI sticky headers need to sit below the sticky top search bar. */
.product-ui-sticky-header-table {
  border-collapse: collapse;
}

.product-ui-sticky-header-shell {
  position: sticky;
  top: var(--product-ui-sticky-header-top, 0px);
  z-index: 30;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.product-ui-sticky-header-shell > * {
  pointer-events: auto;
}

.product-ui-sticky-header-clone-table {
  border-collapse: collapse;
  visibility: hidden;
}

.product-ui-sticky-header-shell.is-visible .product-ui-sticky-header-clone-table {
  visibility: visible;
}

.product-ui-sticky-header-clone-table thead tr th {
  background-color: rgb(249 250 251);
  box-shadow: 0 1px 0 rgb(229 231 235);
}

.dark .product-ui-sticky-header-clone-table thead tr th,
:where(.dark, .dark *) .product-ui-sticky-header-clone-table thead tr th {
  background-color: rgba(31, 41, 55, 0.98);
  box-shadow: 0 1px 0 rgb(55 65 81);
}

.product-ui-sticky-header-shell.is-visible + [data-sticky-table-header-target="scroller"] .product-ui-sticky-header-table thead {
  visibility: hidden;
}

body[data-product-action="index"] [data-controller~="sticky-table-header"] table th,
body[data-product-action="index"] [data-controller~="sticky-table-header"] table td.tabular-nums,
body[data-product-action="index"] [data-controller~="sticky-table-header"] table td .tabular-nums,
body[data-product-action="index"] [data-controller~="sticky-table-header"] table td.whitespace-nowrap,
body[data-product-action="index"] [data-controller~="sticky-table-header"] table td .whitespace-nowrap {
  white-space: nowrap;
}

/* 2. Negative number highlighting (enterprise financial / accounting pattern)
   Negative values display in red — a universal accounting convention.
   Use the .negative class on any element containing a negative amount. */
.negative,
td.negative,
span.negative {
  color: #dc2626 !important; /* red-600 */
}

.dark .negative,
:where(.dark, .dark *) .negative,
:where(.dark, .dark *) td.negative,
:where(.dark, .dark *) span.negative {
  color: #f87171 !important; /* red-400 for dark mode */
}

/* 3. Keyboard shortcuts help overlay (enterprise financial pattern)
   Press ? to see a panel listing all keyboard shortcuts — common in
   Bloomberg Terminal, Jira, GitHub, and other professional tools. */
.kbd-help-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
}

.kbd-help-overlay.is-open {
  display: flex;
}

.kbd-help-panel {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 1.5rem;
}

.dark .kbd-help-panel,
:where(.dark, .dark *) .kbd-help-panel {
  background: #1f2937; /* gray-800 */
  color: #f9fafb; /* gray-50 */
}

.kbd-help-panel h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kbd-help-panel .kbd-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin: 1rem 0 0.375rem;
}

.dark .kbd-help-panel .kbd-section-title,
:where(.dark, .dark *) .kbd-help-panel .kbd-section-title {
  color: #9ca3af;
}

.kbd-help-panel .kbd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3125rem 0;
  border-bottom: 1px solid rgb(243 244 246);
  font-size: 0.875rem;
}

.dark .kbd-help-panel .kbd-row,
:where(.dark, .dark *) .kbd-help-panel .kbd-row {
  border-bottom-color: rgb(55 65 81);
}

.kbd-help-panel .kbd-row:last-child {
  border-bottom: none;
}

.kbd-help-panel kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  color: #111827;
  white-space: nowrap;
}

.dark .kbd-help-panel kbd,
:where(.dark, .dark *) .kbd-help-panel kbd {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.kbd-help-close-btn {
  float: right;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #6b7280;
  padding: 0;
  margin-left: auto;
}

.kbd-help-close-btn:hover {
  color: #111827;
}

.dark .kbd-help-close-btn:hover,
:where(.dark, .dark *) .kbd-help-close-btn:hover {
  color: #f9fafb;
}

/* Admin main navigation: offset fixed sidebar from content */
@media (min-width: 1280px) {
  #main-menu {
    top: 4rem;
    width: 15rem;
  }

  #main-menu:not([data-sidebar-collapsed="true"]) {
    transform: translateX(0);
  }

  #main-menu[data-sidebar-collapsed="true"] {
    transform: translateX(-100%);
  }

  #app-shell.has-admin-sidebar {
    margin-inline-start: 15rem;
  }
}

/* Repository-owned marketing knowledge pages. Kept out of tenant product UI. */
.marketing-content-navigation a,
.marketing-content main a:not(.marketing-contact-button) { color: #cbd5e1; }
.marketing-content main a:not(.marketing-contact-button):hover,
.marketing-content-navigation a:hover { color: #fff; }
.marketing-content .marketing-contact-button { color: #020617; }
.marketing-content h1 { overflow-wrap: anywhere; }
.marketing-knowledge { color: #cbd5e1; line-height: 1.8; overflow-wrap: anywhere; }
.marketing-knowledge h2 { color: #fff; font-size: 1.5rem; font-weight: 600; margin: 2.5rem 0 1rem; line-height: 1.3; }
.marketing-knowledge h3 { color: #fff; font-size: 1.2rem; font-weight: 600; margin: 2rem 0 1rem; }
.marketing-knowledge p { margin: 1rem 0; }
.marketing-knowledge ul { list-style: disc; padding-left: 1.5rem; margin: 1rem 0; }
.marketing-knowledge li { margin: .5rem 0; }
.marketing-knowledge a { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.marketing-people .marketing-people-link { color: #c7d2fe; }
.marketing-people .marketing-people-link:hover { color: #fff; }
.services-hero { position: relative; isolation: isolate; }
.services-hero-background {
  position: absolute;
  inset: -2rem calc((100vw - 100%) / -2) 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 10% 20%, rgb(56 189 248 / .12), transparent 60%), radial-gradient(ellipse at 90% 30%, rgb(139 92 246 / .12), transparent 55%);
}
.services-landing .services-navigation { background: rgb(15 23 42 / .5); border-color: rgb(255 255 255 / .1); backdrop-filter: none; box-shadow: none; }
.services-hero-layout { display: grid; gap: 3rem; padding: 4rem 0; align-items: center; }
.services-hero-copy { min-width: 0; }
.services-eyebrow { color: #a5b4fc; font-size: .75rem; font-weight: 500; line-height: 1.7; letter-spacing: .12em; text-transform: uppercase; }
.services-hero-title { max-width: 12em; margin-top: 1.25rem; font-size: clamp(2.25rem, 4.2vw, 3.75rem); font-weight: 750; line-height: 1.08; letter-spacing: -.035em; overflow-wrap: anywhere; text-wrap: balance; transition: none; }
.services-hero-intro { max-width: 34rem; margin-top: 1.5rem; color: #cbd5e1; font-size: 1.0625rem; font-weight: 400; line-height: 1.8; }
.services-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; margin-top: 2rem; }
.services-consultation-button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; padding: .875rem 1.25rem; border-radius: .75rem; background: #4338ca; color: #fff; font-size: .875rem; font-weight: 600; transition: background-color .2s; }
.services-consultation-button:hover { background: #3730a3; color: #fff; }
.services-dashboard-link { color: #cbd5e1; font-size: .875rem; font-weight: 500; line-height: 1.6; }
.services-dashboard-link:hover { color: #fff; }
.services-hero-promises { display: flex; flex-wrap: wrap; gap: .625rem 1.25rem; margin-top: 2rem; padding: 0; list-style: none; color: #cbd5e1; font-size: .8125rem; line-height: 1.6; }
.services-hero-promises span { margin-right: .35rem; color: #6ee7b7; }
.services-hero-audience { max-width: 34rem; margin-top: 1.25rem; color: #94a3b8; font-size: .8125rem; line-height: 1.7; }
.services-hero-art { min-width: 0; }
.services-client-dashboard { margin: 0; scroll-margin-top: 2rem; }
.services-dashboard-image { display: block; width: 100%; height: auto; border: 1px solid rgb(255 255 255 / .12); border-radius: 1.25rem; box-shadow: 0 24px 64px rgb(2 6 23 / .25); }
.services-dashboard-sample { margin-top: .75rem; color: #94a3b8; font-size: .625rem; text-align: right; }
.services-credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding: 2rem 0; border-block: 1px solid rgb(255 255 255 / .1); }
.services-credential-value { color: #f8fafc; font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; overflow-wrap: anywhere; }
.services-credential-label { max-width: 16rem; margin-top: .5rem; color: #94a3b8; font-size: .8125rem; font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; }
.services-promise { padding-top: 5rem; }
.services-promise-heading { max-width: 44rem; }
.services-promise h2 { margin-top: 1rem; color: #f8fafc; font-size: clamp(1.875rem, 3vw, 2.5rem); font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.services-promise-intro { margin-top: 1.25rem; color: #94a3b8; font-size: 1rem; line-height: 1.8; }
.services-promise-cards { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.services-promise-cards article { padding: 1.75rem; border: 1px solid rgb(255 255 255 / .1); border-radius: 1rem; background: #0b1222; }
.services-promise-number { color: #818cf8; font-size: .75rem; }
.services-promise h3 { margin-top: 1.5rem; color: #f8fafc; font-size: 1.25rem; font-weight: 500; }
.services-promise-cards p { margin-top: .75rem; color: #94a3b8; font-size: .9375rem; line-height: 1.8; }
.services-landing .marketing-people { background: #0b1222; border-radius: 1.25rem; }
.services-landing #pricing > div, .services-landing #how-it-works, .services-landing .services-benefits-faq > div { background: #0b1222; box-shadow: none; border-radius: 1.5rem; }
.services-landing .services-pricing-card { border-radius: 1.25rem; }
.services-consultation-button:focus-visible, .services-dashboard-link:focus-visible, .services-client-dashboard:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 5px; }
@media (min-width: 768px) {
  .services-promise-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .services-credentials { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .services-hero-layout { grid-template-columns: 1fr 1.1fr; gap: 3rem; padding: 6rem 0; align-items: start; }
  .services-hero-art { margin-top: 2rem; }
  .services-promise { padding-top: 6rem; }
}
.services-pricing-grid { grid-template-columns: minmax(0, 1fr); }
.services-pricing-content { display: flex; flex-direction: column; min-width: 0; }
.services-pricing-badge { min-height: 2rem; margin-bottom: .5rem; }
.services-pricing-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; }
.services-pricing-amount { white-space: nowrap; font-size: clamp(1.5rem, 7vw, 2.25rem); }
.services-benefits-faq { align-items: start; }
.services-footer-links a { color: #cbd5e1; transition: color .2s; }
.services-footer-links a:hover, .services-footer-links a:focus-visible { color: #fff; }
.services-navigation { position: relative; z-index: 40; }
.services-navigation-logo { flex-shrink: 0; }
.services-navigation-desktop { display: none; white-space: nowrap; }
.services-navigation-mobile { display: flex; }
.services-navigation-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  list-style: none;
}
.services-navigation-toggle::-webkit-details-marker { display: none; }
.services-navigation-close-icon,
.services-navigation-disclosure[open] .services-navigation-open-icon { display: none; }
.services-navigation-disclosure[open] .services-navigation-close-icon { display: block; }
.services-navigation-toggle:hover { background: rgb(255 255 255 / .1); }
.services-navigation a:focus-visible,
.services-navigation-toggle:focus-visible { outline: 2px solid #c7d2fe; outline-offset: 4px; }
.services-navigation-panel {
  position: absolute;
  top: calc(100% + .5rem);
  inset-inline: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  max-height: calc(100dvh - 7rem);
  overflow-y: auto;
  padding: .75rem;
  border: 1px solid rgb(255 255 255 / .15);
  border-radius: 1.25rem;
  background: #0f172a;
  box-shadow: 0 20px 48px rgb(2 6 23 / .4);
}
.services-navigation-panel a { padding: .875rem 1rem; border-radius: .75rem; color: #e2e8f0; }
.services-navigation-panel a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.services-navigation-panel .services-navigation-login { margin-top: .5rem; border-top: 1px solid rgb(255 255 255 / .1); }
@media (min-width: 640px) {
  .services-pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-pricing-card, .services-pricing-content {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 8;
    row-gap: 0;
  }
  .services-pricing-features { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; }
  .services-pricing-amount { font-size: 2rem; }
}
@media (min-width: 1280px) {
  .services-navigation-desktop { display: flex; }
  .services-navigation-mobile { display: none; }
  .services-pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .services-pricing-amount { font-size: clamp(1.5rem, 2.1vw, 2rem); }
}
.marketing-people-office { aspect-ratio: 3 / 2; object-position: 35% center; }
.marketing-about-photo { aspect-ratio: 4 / 5; object-position: center 35%; height: auto; }
@media (min-width: 1024px) {
  .marketing-founder-main { max-width: 70rem; }
  .marketing-founder-profile { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; column-gap: 4rem; align-items: start; }
  .marketing-founder-profile > * { grid-column: 1; min-width: 0; }
  .marketing-founder-profile > .marketing-about-photos { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; width: 100%; }
}
.marketing-founder-credentials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; padding: 1rem 0; border-block: 1px solid rgb(255 255 255 / .1); list-style: none; }
.marketing-founder-credentials li { padding: .4rem .75rem; border-radius: .5rem; background: rgb(255 255 255 / .05); color: #cbd5e1; font-size: .875rem; overflow-wrap: anywhere; }

/* Light palette for Accountrum's custom marketing sections. */
html:not(.dark) .services-landing .services-navigation {
  background: rgb(255 255 255 / .85);
  border-color: #e2e8f0;
}
html:not(.dark) .services-eyebrow,
html:not(.dark) .services-promise-number { color: #4338ca; }
html:not(.dark) .services-hero-intro,
html:not(.dark) .services-hero-promises,
html:not(.dark) .services-dashboard-link,
html:not(.dark) .services-footer-links a,
html:not(.dark) .marketing-knowledge,
html:not(.dark) .marketing-content main a:not(.marketing-contact-button) { color: #475569; }
html:not(.dark) .services-hero-audience,
html:not(.dark) .services-credential-label,
html:not(.dark) .services-promise-intro,
html:not(.dark) .services-promise-cards p,
html:not(.dark) .services-dashboard-sample { color: #64748b; }
html:not(.dark) .services-credential-value,
html:not(.dark) .services-promise h2,
html:not(.dark) .services-promise h3,
html:not(.dark) .marketing-knowledge h2,
html:not(.dark) .marketing-knowledge h3,
html:not(.dark) .marketing-knowledge a,
html:not(.dark) .services-dashboard-link:hover,
html:not(.dark) .services-footer-links a:hover,
html:not(.dark) .services-footer-links a:focus-visible,
html:not(.dark) .marketing-content main a:not(.marketing-contact-button):hover { color: #0f172a; }
html:not(.dark) .services-hero-promises span { color: #047857; }
html:not(.dark) .services-dashboard-image {
  border-color: #cbd5e1;
  box-shadow: 0 28px 64px rgb(15 23 42 / .1);
}
html:not(.dark) .services-credentials,
html:not(.dark) .services-promise-cards article,
html:not(.dark) .marketing-founder-credentials { border-color: #e2e8f0; }
html:not(.dark) .services-promise-cards article,
html:not(.dark) .services-landing .marketing-people,
html:not(.dark) .services-landing #pricing > div,
html:not(.dark) .services-landing .services-benefits-faq > div { background: #fff; }
/* The workflow and closing invitation retain their contrasting dark surface. */
html:not(.dark) .marketing-people .marketing-people-link { color: #4338ca; }
html:not(.dark) .marketing-people .marketing-people-link:hover { color: #312e81; }
html:not(.dark) .marketing-founder-credentials li { background: #e2e8f0; color: #334155; }
html:not(.dark) .services-navigation-toggle { color: #0f172a; border-color: #cbd5e1; }
html:not(.dark) .services-navigation-toggle:hover { background: #f1f5f9; }
html:not(.dark) .services-navigation-panel { background: #fff; border-color: #e2e8f0; box-shadow: 0 20px 48px rgb(15 23 42 / .12); }
html:not(.dark) .services-navigation-panel a { color: #334155; }
html:not(.dark) .services-navigation-panel a:hover { background: #f1f5f9; color: #0f172a; }
html:not(.dark) .services-navigation-panel .services-navigation-login { border-color: #e2e8f0; }
html:not(.dark) .services-navigation-logo img { filter: brightness(.35); }
html:not(.dark) .marketing-content .marketing-contact-button { background: #0f172a; color: #fff; }
@media (max-width: 639px) {
  .services-navigation-logo { width: 4.5rem; }
  .services-navigation-logo img { transform: scale(2.5); }
}

/* Focused indigo accents for Accountrum's marketing funnel. */
.services-navigation .services-navigation-cta { background: #4338ca; color: #fff; }
.services-navigation .services-navigation-cta:hover { background: #3730a3; color: #fff; }
.services-consultation-button:focus-visible,
.services-navigation .services-navigation-cta:focus-visible,
.services-landing .services-pricing-card-featured:focus-visible {
  outline: 3px solid #818cf8;
  outline-offset: 4px;
}
.services-landing .services-pricing-card-featured {
  background: #eef2ff;
  border-color: #4338ca;
  box-shadow: 0 20px 50px -30px rgb(67 56 202 / .45);
}
.services-landing .services-pricing-popular { background: #4338ca; color: #fff; }
.dark .services-landing .services-pricing-card-featured {
  background: #1e1b4b;
  border-color: #818cf8;
}
.services-landing .services-closing-invitation { background: #312e81; }
.services-closing-invitation .services-closing-eyebrow { color: #c7d2fe; }
.services-closing-invitation .services-closing-button { background: #fff; color: #312e81; }
.services-closing-invitation .services-closing-button:hover { background: #eef2ff; color: #312e81; }
.services-closing-invitation a:focus-visible { outline: 3px solid #c7d2fe; outline-offset: 4px; }

/* Keep the initial FAQ list compact with a native, keyboard-accessible disclosure. */
.services-faq-more-toggle { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; width: fit-content; cursor: pointer; list-style: none; color: #c7d2fe; font-size: .875rem; font-weight: 600; }
.services-faq-more-toggle::-webkit-details-marker { display: none; }
.services-faq-show-less { display: none; }
.services-faq-more[open] > summary .services-faq-show-more { display: none; }
.services-faq-more[open] > summary .services-faq-show-less { display: inline; }
.services-faq-more[open] > summary .services-faq-more-arrow { transform: rotate(180deg); }
.services-faq-more-toggle:hover { text-decoration: underline; text-underline-offset: .25em; }
.services-faq-more-toggle:focus-visible { outline: 3px solid #818cf8; outline-offset: 4px; border-radius: .25rem; }
html:not(.dark) .services-faq-more-toggle { color: #4338ca; }

/* Let colour and type size carry the homepage hierarchy with lighter letterforms. */
.services-landing .services-hero-title,
.services-landing .services-credential-value,
.services-landing .services-promise h2,
.services-landing .font-semibold,
.services-landing .font-bold,
.services-landing .services-consultation-button,
.services-landing .services-faq-more-toggle { font-weight: 500; }

/* Fund Accounting & NAV Services landing page (Accountrum). */
.fa-page {
  --fa-ink: #f8fafc;
  --fa-body: #cbd5e1;
  --fa-muted: #94a3b8;
  --fa-line: rgb(255 255 255 / .1);
  --fa-line-strong: rgb(255 255 255 / .18);
  --fa-surface: #0b1222;
  --fa-surface-raised: rgb(255 255 255 / .04);
  --fa-accent: #a5b4fc;
  --fa-accent-strong: #4338ca;
  --fa-accent-strong-hover: #3730a3;
  --fa-accent-soft: rgb(99 102 241 / .14);
  --fa-check: #6ee7b7;
  --fa-band: #070d1a;
  color: var(--fa-ink);
  overflow-x: clip;
}
html:not(.dark) .fa-page {
  --fa-ink: #0f172a;
  --fa-body: #475569;
  --fa-muted: #64748b;
  --fa-line: #e2e8f0;
  --fa-line-strong: #cbd5e1;
  --fa-surface: #fff;
  --fa-surface-raised: #fff;
  --fa-accent: #4338ca;
  --fa-accent-soft: rgb(67 56 202 / .08);
  --fa-check: #047857;
  --fa-band: #0f172a;
}
.fa-page a:focus-visible, .fa-page summary:focus-visible, .fa-page section:focus-visible { outline: 3px solid #818cf8; outline-offset: 4px; border-radius: .5rem; }
.fa-page section[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.fa-breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; color: var(--fa-muted); font-size: .8125rem; }
.fa-breadcrumbs a { color: var(--fa-muted); transition: color .2s; }
.fa-breadcrumbs a:hover { color: var(--fa-ink); }
.fa-eyebrow { color: var(--fa-accent); font-size: .75rem; font-weight: 600; letter-spacing: .16em; line-height: 1.6; text-transform: uppercase; }
.fa-lead { margin-top: 1.25rem; max-width: 42rem; color: var(--fa-body); font-size: 1.0625rem; line-height: 1.8; }
.fa-section { padding-top: 6rem; scroll-margin-top: 2rem; }
.fa-section h2, .fa-why h2, .fa-final h2 { margin-top: .875rem; color: var(--fa-ink); font-size: clamp(1.875rem, 3.2vw, 2.625rem); font-weight: 650; line-height: 1.15; letter-spacing: -.028em; text-wrap: balance; }
.fa-section-heading { max-width: 40rem; }
.fa-section-heading-wide { max-width: 48rem; }

/* Buttons */
.fa-actions { display: flex; flex-wrap: wrap; gap: .875rem; margin-top: 2rem; }
.fa-actions-center { justify-content: center; }
.fa-button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; gap: .5rem; padding: .875rem 1.375rem; border-radius: .75rem; font-size: .9375rem; font-weight: 600; line-height: 1.2; text-align: center; transition: background-color .2s, border-color .2s, color .2s, transform .2s; }
.fa-button-primary { background: var(--fa-accent-strong); color: #fff; box-shadow: 0 12px 30px -14px rgb(67 56 202 / .8); }
.fa-button-primary:hover { background: var(--fa-accent-strong-hover); color: #fff; transform: translateY(-1px); }
.fa-button-secondary { border: 1px solid var(--fa-line-strong); color: var(--fa-ink); background: var(--fa-surface-raised); }
.fa-button-secondary:hover { border-color: var(--fa-accent); color: var(--fa-ink); transform: translateY(-1px); }
.fa-text-link { display: inline-flex; gap: .375rem; margin-top: 1.5rem; color: var(--fa-accent); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em; transition: text-decoration-color .2s; }
.fa-text-link:hover { text-decoration-color: currentColor; }
.fa-hint { margin-top: .75rem; color: var(--fa-muted); font-size: .8125rem; }

/* A — Hero */
.fa-hero { position: relative; isolation: isolate; display: grid; gap: 3.5rem; padding: 3.5rem 0 3rem; align-items: center; }
.fa-hero-backdrop { position: absolute; inset: -6rem calc((100vw - 100%) / -2) 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 12% 25%, rgb(99 102 241 / .16), transparent 70%),
    radial-gradient(ellipse 40% 50% at 88% 40%, rgb(56 189 248 / .08), transparent 70%),
    linear-gradient(to right, var(--fa-line) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(to bottom, var(--fa-line) 1px, transparent 1px) 0 0 / 72px 72px;
  mask-image: radial-gradient(ellipse 70% 70% at 40% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 40% 40%, #000 30%, transparent 75%);
}
.fa-hero-copy { min-width: 0; }
.fa-hero-title { margin-top: 1.25rem; font-size: clamp(2.375rem, 5vw, 4.125rem); font-weight: 720; line-height: 1.04; letter-spacing: -.04em; text-wrap: balance; overflow-wrap: anywhere; }
.fa-hero-title span { display: block; }
.fa-hero-title-accent { color: var(--fa-accent); }
.fa-hero-intro { max-width: 36rem; margin-top: 1.75rem; color: var(--fa-body); font-size: 1.125rem; line-height: 1.8; }
.fa-hero-art { min-width: 0; margin: 0; padding: 1.5rem; border: 1px solid var(--fa-line); border-radius: 1.5rem; background: linear-gradient(160deg, var(--fa-surface-raised), transparent 60%), var(--fa-surface); box-shadow: 0 30px 80px -40px rgb(2 6 23 / .55); }
.fa-structure { display: block; width: 100%; height: auto; }
.fa-structure-lines path { stroke: var(--fa-line-strong); stroke-width: 1.5; }
.fa-structure-lines .fa-structure-flow { stroke: var(--fa-accent); stroke-dasharray: 5 6; opacity: .75; }
.fa-node rect { fill: var(--fa-surface); stroke: var(--fa-line-strong); stroke-width: 1.25; }
.fa-node text { fill: var(--fa-body); font-size: 14px; font-weight: 500; text-anchor: middle; dominant-baseline: middle; }
.fa-node-primary rect { fill: var(--fa-accent-soft); stroke: var(--fa-accent); }
.fa-node-primary text { fill: var(--fa-ink); font-weight: 650; }
.fa-node-check .fa-check { stroke: var(--fa-check); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.fa-node text, .fa-node-check text { transform: translateY(-1px); }
html:not(.dark) .fa-hero-art { box-shadow: 0 30px 80px -48px rgb(15 23 42 / .35); background: linear-gradient(160deg, #f8fafc, #fff 60%); }
.fa-trust { display: flex; flex-wrap: wrap; gap: .75rem 0; margin: 0; padding: 1.25rem 0; border-block: 1px solid var(--fa-line); list-style: none; color: var(--fa-body); font-size: .875rem; font-weight: 500; }
.fa-trust li { display: inline-flex; align-items: center; padding-right: 1.25rem; }
.fa-trust li + li::before { content: ""; width: 1px; height: 1rem; margin-right: 1.25rem; background: var(--fa-line-strong); }

/* B — Audience */
.fa-audience { display: grid; gap: 3rem; }
.fa-audience-grid { display: grid; gap: 1px; border: 1px solid var(--fa-line); border-radius: 1.25rem; overflow: hidden; background: var(--fa-line); }
.fa-audience-card { padding: 2rem 1.75rem; background: var(--fa-surface); transition: background-color .25s; }
.fa-audience-card:hover { background: var(--fa-accent-soft); }
html:not(.dark) .fa-audience-card:hover { background: #f5f5ff; }
.fa-icon { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border: 1px solid var(--fa-line-strong); border-radius: .75rem; color: var(--fa-accent); }
.fa-audience-card h3 { margin-top: 1.5rem; color: var(--fa-ink); font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; }
.fa-audience-card p { margin-top: .75rem; color: var(--fa-body); font-size: .9375rem; line-height: 1.75; }

/* C — Services */
.fa-services:focus { outline: none; }
.fa-service-list { display: grid; gap: 0; margin: 3rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--fa-line); }
.fa-service { display: grid; gap: 1.5rem; padding: 2.25rem 0; border-bottom: 1px solid var(--fa-line); }
.fa-service-number { color: var(--fa-accent); font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.fa-service-head h3 { margin-top: .5rem; color: var(--fa-ink); font-size: 1.375rem; font-weight: 620; letter-spacing: -.015em; }
.fa-service-head p { margin-top: .75rem; max-width: 30rem; color: var(--fa-body); line-height: 1.75; }
.fa-service-label { color: var(--fa-muted); font-size: .6875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.fa-checklist { display: grid; gap: .625rem; margin: .875rem 0 0; padding: 0; list-style: none; }
.fa-checklist li { position: relative; padding-left: 1.75rem; color: var(--fa-ink); font-size: .9375rem; line-height: 1.6; }
.fa-checklist li::before { content: ""; position: absolute; left: 0; top: .5rem; width: .75rem; height: .375rem; border-left: 2px solid var(--fa-check); border-bottom: 2px solid var(--fa-check); transform: rotate(-45deg); }
.fa-service-note { margin-top: 1.25rem; padding: .875rem 1rem; border-left: 2px solid var(--fa-accent); border-radius: 0 .5rem .5rem 0; background: var(--fa-accent-soft); color: var(--fa-body); font-size: .8125rem; line-height: 1.65; }
.fa-footnote { margin-top: 1.75rem; max-width: 48rem; color: var(--fa-muted); font-size: .8125rem; line-height: 1.7; }
.fa-inline-cta { margin-top: .5rem; }

/* D — Why (editorial band) */
.fa-why { margin-top: 7rem; padding: 6rem 0; background:
  radial-gradient(ellipse 60% 80% at 100% 0%, rgb(99 102 241 / .22), transparent 60%), var(--fa-band); color: #f8fafc; }
.fa-why .fa-eyebrow { color: #a5b4fc; }
.fa-why h2 { color: #fff; }
.fa-why-layout { display: grid; gap: 3.5rem; }
.fa-why-intro { margin-top: 1.75rem; color: #e2e8f0; font-family: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif; font-size: clamp(1.1875rem, 1.8vw, 1.4375rem); line-height: 1.65; }
.fa-why .fa-text-link { color: #c7d2fe; }
.fa-why-disclaimer { margin-top: 1.5rem; color: #94a3b8; font-size: .75rem; line-height: 1.6; }
.fa-why-points { margin: 0; }
.fa-why-point { display: grid; gap: .5rem; padding: 1.75rem 0; border-top: 1px solid rgb(255 255 255 / .12); }
.fa-why-point:last-child { border-bottom: 1px solid rgb(255 255 255 / .12); }
.fa-why-point dt { display: flex; align-items: baseline; gap: 1rem; color: #fff; font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.fa-why-index { color: #818cf8; font-size: .8125rem; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.fa-why-point dd { margin: 0; padding-left: 2.25rem; color: #cbd5e1; line-height: 1.75; }

/* E — Process timeline */
.fa-timeline { position: relative; display: grid; gap: 2rem; margin: 3.5rem 0 0; padding: 0; list-style: none; }
.fa-timeline-step { position: relative; padding-left: 3.75rem; }
.fa-timeline-step::before { content: ""; position: absolute; left: 1.25rem; top: 2.75rem; bottom: -2rem; width: 1px; background: var(--fa-line-strong); }
.fa-timeline-step:last-child::before { display: none; }
.fa-timeline-marker { position: absolute; left: 0; top: 0; display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border: 1px solid var(--fa-accent); border-radius: 50%; background: var(--fa-surface); color: var(--fa-accent); font-size: .9375rem; font-weight: 650; }
.fa-timeline-step h3 { padding-top: .375rem; color: var(--fa-ink); font-size: 1.1875rem; font-weight: 600; }
.fa-timeline-step p { margin-top: .625rem; color: var(--fa-body); font-size: .9375rem; line-height: 1.75; }
.fa-controls { display: flex; flex-wrap: wrap; gap: .625rem; margin: 3rem 0 0; padding: 0; list-style: none; }
.fa-controls li { padding: .5rem .875rem; border: 1px solid var(--fa-line-strong); border-radius: 999px; color: var(--fa-body); font-size: .8125rem; font-weight: 500; }

/* F — Technology */
.fa-technology-layout { display: grid; gap: 3rem; align-items: start; }
.fa-technology-scope { margin-top: 1.25rem; padding-left: 1rem; border-left: 2px solid var(--fa-line-strong); color: var(--fa-muted); font-size: .875rem; line-height: 1.7; }
.fa-technology-panel { padding: 1.75rem; border: 1px solid var(--fa-line); border-radius: 1.5rem; background: var(--fa-surface); }
.fa-flow { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0 0 1.75rem; border-bottom: 1px solid var(--fa-line); list-style: none; }
.fa-flow li { display: inline-flex; align-items: center; gap: .5rem; color: var(--fa-ink); font-size: .8125rem; font-weight: 600; }
.fa-flow li { padding: .5rem .75rem; border: 1px solid var(--fa-line-strong); border-radius: .625rem; background: var(--fa-surface-raised); }
.fa-flow li:last-child { border-color: var(--fa-accent); background: var(--fa-accent-soft); }
.fa-benefits { display: grid; gap: 1.5rem; margin-top: 1.75rem; }
.fa-benefit h3 { color: var(--fa-ink); font-size: 1rem; font-weight: 600; }
.fa-benefit p { margin-top: .375rem; color: var(--fa-body); font-size: .875rem; line-height: 1.65; }

/* G — Engagement */
.fa-engagement-panel { display: grid; gap: 2.5rem; padding: 2rem; border: 1px solid var(--fa-line); border-radius: 1.75rem; background: linear-gradient(135deg, var(--fa-accent-soft), transparent 55%), var(--fa-surface); }
.fa-engagement-factors h3 { color: var(--fa-muted); font-size: .6875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.fa-engagement-factors ul { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: fa-factor; }
.fa-engagement-factors li { display: flex; gap: 1rem; padding: .875rem 0; border-bottom: 1px solid var(--fa-line); color: var(--fa-ink); font-size: .9375rem; counter-increment: fa-factor; }
.fa-engagement-factors li::before { content: counter(fa-factor, decimal-leading-zero); min-width: 1.5rem; color: var(--fa-accent); font-size: .75rem; font-weight: 600; line-height: 1.6rem; font-variant-numeric: tabular-nums; }

/* H — FAQ */
.fa-faq { display: grid; gap: 2.5rem; }
.fa-faq-list { border-top: 1px solid var(--fa-line); }
.fa-faq-item { border-bottom: 1px solid var(--fa-line); }
.fa-faq-item summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding: 1.375rem 0; cursor: pointer; list-style: none; }
.fa-faq-item summary::-webkit-details-marker { display: none; }
.fa-faq-item summary h3 { color: var(--fa-ink); font-size: 1.0625rem; font-weight: 600; line-height: 1.5; }
.fa-faq-item summary:hover h3 { color: var(--fa-accent); }
.fa-faq-toggle { position: relative; flex-shrink: 0; width: 1.75rem; height: 1.75rem; margin-top: .0625rem; border: 1px solid var(--fa-line-strong); border-radius: 50%; }
.fa-faq-toggle::before, .fa-faq-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: .625rem; height: 1.5px; background: var(--fa-body); transform: translate(-50%, -50%); transition: transform .25s; }
.fa-faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.fa-faq-item[open] .fa-faq-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.fa-faq-item p { max-width: 44rem; padding: 0 2.5rem 1.5rem 0; color: var(--fa-body); line-height: 1.8; }

/* Scope + related */
.fa-scope { display: grid; gap: 2.5rem; margin-top: 5rem; padding: 2rem; border: 1px solid var(--fa-line); border-radius: 1.25rem; }
.fa-scope h2 { color: var(--fa-ink); font-size: 1.125rem; font-weight: 600; }
.fa-scope-body p { margin-top: .875rem; color: var(--fa-body); font-size: .9375rem; line-height: 1.75; }
.fa-related ul { margin: .875rem 0 0; padding: 0; list-style: none; }
.fa-related li { padding: .5rem 0; border-bottom: 1px solid var(--fa-line); }
.fa-related a { color: var(--fa-body); font-size: .9375rem; transition: color .2s; }
.fa-related a:hover { color: var(--fa-ink); text-decoration: underline; text-underline-offset: .2em; }

/* I — Final CTA */
.fa-final { position: relative; margin-top: 6rem; padding: 4rem 1.5rem; border-radius: 2rem; overflow: hidden; text-align: center; color: #fff;
  background: radial-gradient(ellipse 70% 90% at 50% 0%, rgb(99 102 241 / .35), transparent 70%), #0b1222; border: 1px solid rgb(255 255 255 / .1); }
.fa-final h2 { max-width: 40rem; margin: 0 auto; color: #fff; }
.fa-final > p { max-width: 38rem; margin: 1.25rem auto 0; color: #cbd5e1; font-size: 1.0625rem; line-height: 1.8; }
.fa-final .fa-final-email { margin-top: 1.5rem; color: #94a3b8; font-size: .875rem; }
.fa-final-email a { color: #e0e7ff; text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.fa-final-email a:hover { color: #fff; }

@media (min-width: 640px) {
  .fa-audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fa-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fa-engagement-panel { padding: 3rem; }
  .fa-scope { padding: 2.5rem; }
  .fa-final { padding: 5rem 3rem; }
}
@media (min-width: 768px) {
  .fa-service { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
  .fa-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; row-gap: 3rem; }
  .fa-timeline-step::before { display: none; }
}
@media (min-width: 1024px) {
  .fa-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4rem; padding: 5.5rem 0 4.5rem; }
  .fa-section { padding-top: 8rem; }
  .fa-audience { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start; }
  .fa-audience .fa-section-heading { position: sticky; top: 2rem; }
  .fa-service { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; }
  .fa-service-head { display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-content: start; }
  .fa-service-number { grid-row: 1 / span 2; padding-top: .375rem; }
  .fa-service-head h3 { margin-top: 0; }
  .fa-why { padding: 8rem 0; }
  .fa-why-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6rem; align-items: start; }
  .fa-timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 2rem; }
  .fa-timeline-step { padding-left: 0; padding-top: 4rem; }
  .fa-timeline-step::before { display: block; left: 3.25rem; right: -2rem; top: 1.25rem; bottom: auto; width: auto; height: 1px; }
  .fa-technology-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 5rem; }
  .fa-engagement-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; padding: 4rem; }
  .fa-faq { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 4rem; align-items: start; }
  .fa-scope { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 4rem; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.fa-page) { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .fa-page *, .fa-page *::before, .fa-page *::after { transition: none !important; }
  .fa-button:hover { transform: none; }
}
.fa-faq-item .fa-faq-source { margin-top: -.75rem; font-size: .875rem; }
.fa-faq-source a { color: var(--fa-accent); text-decoration: underline; text-underline-offset: .2em; }
