/**
 * SAYBC Enterprise Admin & Live Preview Stylesheet
 * Provides deterministic, compiled-safe styling for native <dialog>,
 * responsive @container data tables, accessible forms (:user-invalid),
 * and the Live Website Preview Studio.
 */

/* 1. Native <dialog> & Modal Scroll Containment (modern-web-guidance: dialog & light-dismiss-a-dialog) */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(13, 13, 13, 0.56);
}

dialog.saybc-modal,
dialog.saybc-dialog {
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 1rem;
  padding: 0;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  max-width: min(94vw, 620px);
  width: 100%;
  max-height: min(92dvh, 880px);
  margin: auto;
  overflow: hidden;
}

dialog.saybc-modal.saybc-modal-lg,
dialog.saybc-dialog.saybc-modal-lg {
  max-width: min(94vw, 880px);
}

dialog.saybc-modal[open],
dialog.saybc-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog.saybc-modal > form,
dialog.saybc-dialog > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(92dvh, 880px);
}

dialog.saybc-preview-dialog {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.25rem;
  padding: 0;
  background: #111111;
  color: #ffffff;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.65);
  max-width: min(96vw, 1440px);
  width: 96vw;
  height: 92dvh;
  max-height: 92dvh;
  margin: auto;
}

dialog.saybc-preview-dialog[open] {
  display: flex;
  flex-direction: column;
}

/* 2. Responsive Data Table with @container (modern-web-guidance: responsive-table) */
.table-wrapper {
  container-type: inline-size;
  overflow-x: auto;
  max-block-size: 70vh;
  border-radius: 0.875rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.table-wrapper:focus-visible {
  outline: 2px solid var(--color-gold, #d4af37);
  outline-offset: 2px;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table-wrapper caption {
  text-align: left;
  padding: 0.875rem 1rem;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  background: #fafaf8;
  border-bottom: 1px solid #e5e7eb;
}

.table-wrapper th,
.table-wrapper td {
  padding: 0.875rem 1rem;
  border-block-end: 1px solid #e5e7eb;
  vertical-align: middle;
}

.table-wrapper thead {
  position: sticky;
  inset-block-start: 0;
  background: #f9fafb;
  z-index: 2;
}

.table-wrapper thead th {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4b5563;
  border-block-end: 2px solid #e5e7eb;
}

.table-wrapper tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: #ffffff;
  z-index: 1;
  font-weight: 800;
  color: #111111;
}

.table-wrapper tbody tr:hover td,
.table-wrapper tbody tr:hover th {
  background: #fafaf8;
}

@container (width < 600px) {
  .table-wrapper thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table-wrapper tbody tr {
    display: grid;
    padding-block: 0.75rem;
    border-block-end: 2px solid #e5e7eb;
  }

  .table-wrapper tbody th {
    position: static;
    background: transparent;
  }

  .table-wrapper tbody td {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem;
    border: none;
    padding-block: 0.35rem;
  }

  .table-wrapper tbody td:nth-of-type(1)::before { content: var(--label-1); font-weight: 800; color: #6b7280; font-size: 0.75rem; text-transform: uppercase; }
  .table-wrapper tbody td:nth-of-type(2)::before { content: var(--label-2); font-weight: 800; color: #6b7280; font-size: 0.75rem; text-transform: uppercase; }
  .table-wrapper tbody td:nth-of-type(3)::before { content: var(--label-3); font-weight: 800; color: #6b7280; font-size: 0.75rem; text-transform: uppercase; }
  .table-wrapper tbody td:nth-of-type(4)::before { content: var(--label-4); font-weight: 800; color: #6b7280; font-size: 0.75rem; text-transform: uppercase; }
  .table-wrapper tbody td:nth-of-type(5)::before { content: var(--label-5); font-weight: 800; color: #6b7280; font-size: 0.75rem; text-transform: uppercase; }
}

/* 3. Accessible Forms & Validation (modern-web-guidance: forms) */
.saybc-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.saybc-label {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #374151;
}

.saybc-hint {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.4;
}

.saybc-error-msg {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b91c1c;
  margin-top: 0.25rem;
}

.saybc-input,
.saybc-select,
.saybc-textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.625rem;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  padding: 0.625rem 0.875rem;
  min-block-size: 2.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.saybc-textarea {
  min-block-size: 5.5rem;
  line-height: 1.55;
  resize: vertical;
}

.saybc-input:focus,
.saybc-select:focus,
.saybc-textarea:focus {
  outline: none;
  border-color: var(--color-gold, #d4af37);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.saybc-input:user-invalid,
.saybc-select:user-invalid,
.saybc-textarea:user-invalid,
.saybc-input[aria-invalid="true"],
.saybc-textarea[aria-invalid="true"] {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.saybc-fieldset {
  border: 1.5px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1rem 1.125rem;
  background: #fafaf8;
  margin: 0;
}

.saybc-legend {
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #111111;
}

:where(#admin-root, dialog) :where(h1, h2, h3) {
  text-wrap: balance;
}

/* 4. Architectural Badges & Buttons */
.saybc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  white-space: nowrap;
}

.saybc-badge-dark {
  background: #18181b;
  color: #f4e4ad;
  border: 1px solid #27272a;
}

.saybc-badge-gold {
  background: #fbf7ea;
  color: #785a12;
  border: 1px solid #e6d6a3;
}

.saybc-badge-green {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.saybc-badge-amber {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.saybc-badge-red {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.saybc-badge-neutral {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.saybc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.5rem;
  padding: 0.5625rem 1rem;
  min-block-size: 2.375rem;
  min-inline-size: 2.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  border: 1px solid transparent;
  line-height: 1.25;
  white-space: nowrap;
}

.saybc-btn:focus-visible,
.saybc-notif-bell:focus-visible,
.saybc-user-trigger:focus-visible,
.saybc-form-actions button:focus-visible {
  outline: 2px solid #0b57d0;
  outline-offset: 2px;
}

.saybc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.saybc-btn-primary {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.saybc-btn-primary:hover:not(:disabled) {
  background: var(--color-gold, #d4af37);
  color: #111111;
  border-color: var(--color-gold, #d4af37);
}

.saybc-btn-gold {
  background: #fbf7ea;
  color: #74560f;
  border-color: #dfd09e;
}

.saybc-btn-gold:hover:not(:disabled) {
  background: var(--color-gold, #d4af37);
  color: #111111;
  border-color: var(--color-gold, #d4af37);
}

.saybc-btn-outline {
  background: #ffffff;
  color: #1f2937;
  border-color: #d1d5db;
}

.saybc-btn-outline:hover:not(:disabled) {
  border-color: #9ca3af;
  background: #f9fafb;
}

.saybc-btn-ghost {
  background: transparent;
  color: #4b5563;
  border-color: transparent;
}

.saybc-btn-ghost:hover:not(:disabled) {
  background: #f3f4f6;
  color: #111111;
}

/* Unified Form Action Bar across React and Vanilla authoring forms */
.saybc-form-actions {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

.saybc-form-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.saybc-form-actions-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin-left: auto;
}

.saybc-btn-edit {
  background: #ffffff;
  color: #111827;
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
}

.saybc-btn-edit:hover:not(:disabled) {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.saybc-btn-success {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.saybc-btn-success:hover:not(:disabled) {
  background: #047857;
}

.saybc-btn-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.saybc-btn-danger:hover:not(:disabled) {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* 5. Toast Notifications & Popover Compliance (modern-web-guidance: persistent-toast-notifications) */
#saybc-toast-container {
  position: fixed;
  inset: 1.25rem 1.25rem auto auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 24rem;
  width: calc(100vw - 2.5rem);
  pointer-events: none;
}

@media (max-width: 640px) {
  #saybc-toast-container {
    inset: auto 0.75rem 0.75rem 0.75rem;
    max-width: none;
    width: calc(100vw - 1.5rem);
  }
}

#saybc-toast-container[popover]:not(:popover-open) {
  display: none;
}

[popover]:is(:popover-open, .\:popover-open) {
  display: flex;
}

/* Inline draft confirmation & review-lock UX states */
.saybc-draft-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

.saybc-draft-feedback[data-tone="warning"] {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.saybc-draft-feedback[data-tone="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.saybc-lock-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.45;
}

.saybc-approvals-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#approvals-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.filter-tab {
  padding: 0.375rem 0.65rem;
  min-block-size: 2rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.saybc-draft-card-flash {
  border-color: var(--color-gold, #d4af37) !important;
  background: #fffdf5 !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22) !important;
}

.saybc-btn:disabled,
.saybc-btn[aria-disabled="true"] {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}

.saybc-toast {
  pointer-events: auto;
  position: relative;
  inset: auto;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  background: #111111;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--color-gold, #d4af37);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: transform 0.22s ease, opacity 0.22s ease, display 0.22s ease, overlay 0.22s ease;
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: reduce) {
  .saybc-toast {
    transition: none;
  }
}

.saybc-toast + .saybc-toast {
  margin-top: 0.25rem;
}

.saybc-toast[data-type="success"] { border-left-color: #10b981; }
.saybc-toast[data-type="error"] { border-left-color: #ef4444; }
.saybc-toast[data-type="warning"] { border-left-color: #f59e0b; }

.inclusively-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 5b. Top Application Header, Workspace Structure, Notification Bell & Drafts Tray */
html {
  scroll-padding-top: 8.5rem;
}

.saybc-workspace-shell {
  overflow-anchor: none;
}

.saybc-topbar {
  position: sticky;
  top: 0.375rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.625rem 1rem;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px -8px rgba(17, 17, 17, 0.14);
}

@media (min-width: 768px) {
  .saybc-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
  }
}

.saybc-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.saybc-topbar-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  background: #0d0d0d;
}

.saybc-topbar-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.25;
}

.saybc-topbar-title {
  margin: 0.0625rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--color-black, #111111);
}

@media (min-width: 768px) {
  .saybc-topbar-title {
    font-size: 1.1875rem;
  }
}

.saybc-topbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  max-width: 100%;
  overflow-x: auto;
}

.saybc-topbar-actions .saybc-btn,
.saybc-topbar-actions .saybc-notif-bell,
.saybc-topbar-actions .saybc-user-trigger,
.saybc-topbar-actions .saybc-mobile-nav-toggle {
  min-block-size: 2.125rem;
  padding: 0.35rem 0.625rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.saybc-topbar-divider {
  display: none;
  width: 1px;
  height: 1.5rem;
  background: #e5e7eb;
}

@media (min-width: 1024px) {
  .saybc-topbar-divider {
    display: inline-block;
  }
}

.saybc-btn-sm {
  min-block-size: 2rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.saybc-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .saybc-workspace-grid {
    grid-template-columns: 248px minmax(0, 1fr);
  }
}

.saybc-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 1280px) {
  .saybc-split-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.saybc-vacancies-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .saybc-vacancies-filter {
    grid-template-columns: 1fr 220px auto;
    align-items: end;
  }
}

.saybc-btn-signout {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.saybc-btn-signout:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.saybc-notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-block-size: 2.375rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.saybc-notif-bell:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  color: #111111;
}

.saybc-notif-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.saybc-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 2.125rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

@media (max-width: 639px) {
  .saybc-user-trigger {
    max-width: 9.5rem;
    overflow: hidden;
  }
  .saybc-user-trigger > span {
    min-width: 0;
    overflow: hidden;
  }
  .saybc-user-trigger > span > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.saybc-user-trigger:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.saybc-user-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #10b981;
  flex-shrink: 0;
}

.saybc-drafts-tray {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
}

.saybc-feedback-thread {
  margin-top: 0.875rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.75rem;
}

.saybc-feedback-composer {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 0.875rem;
}

/* Preview Studio Layout & Typography Guards (compiled independently of Vite CSS bundle) */
@media (min-width: 1024px) {
  .saybc-preview-frame .lg\:grid-cols-\[1fr_360px\] {
    display: grid;
    grid-template-columns: 1fr 360px;
  }
}

.saybc-preview-frame .h-52 { height: 13rem; }
.saybc-preview-frame .pt-12 { padding-top: 3rem; }
.saybc-preview-frame .pb-16 { padding-bottom: 4rem; }
.saybc-preview-frame .py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.saybc-preview-frame .py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.saybc-preview-frame .px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.saybc-preview-frame .py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.saybc-preview-frame .pt-3 { padding-top: 0.75rem; }
.saybc-preview-frame .pr-6 { padding-right: 1.5rem; }
.saybc-preview-frame .pr-2 { padding-right: 0.5rem; }
.saybc-preview-frame .gap-x-8 { column-gap: 2rem; }
.saybc-preview-frame .gap-y-2\.5 { row-gap: 0.625rem; }
.saybc-preview-frame .rounded-\[2px\] { border-radius: 2px; }
.saybc-preview-frame .self-start { align-self: flex-start; }
.saybc-preview-frame .font-normal { font-weight: 400; }
.saybc-preview-frame .font-sans { font-family: ui-sans-serif, system-ui, sans-serif; }
.saybc-preview-frame .text-\[14px\] { font-size: 14px; }
.saybc-preview-frame .text-black\/75 { color: rgba(0, 0, 0, 0.75); }
.saybc-preview-frame .text-black\/85 { color: rgba(0, 0, 0, 0.85); }
.saybc-preview-frame .text-black\/90 { color: rgba(0, 0, 0, 0.9); }
.saybc-preview-frame .text-\[\#111\]\/85 { color: rgba(17, 17, 17, 0.85); }
.saybc-preview-frame .border-black\/15 { border-color: rgba(0, 0, 0, 0.15); }
.saybc-preview-frame .border-black\/30 { border-color: rgba(0, 0, 0, 0.3); }
.saybc-preview-frame .bg-\[\#fafaf8\] { background-color: #fafaf8; }
.saybc-preview-frame .hover\:bg-black\/\[0\.03\]:hover { background-color: rgba(0, 0, 0, 0.03); }
.saybc-preview-frame .space-y-3\.5 > :not(:last-child) { margin-bottom: 0.875rem; }
.saybc-preview-frame .\!text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.saybc-preview-frame .\!text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.saybc-preview-frame .\!my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.saybc-preview-frame .\!my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }

@media (min-width: 640px) {
  .saybc-preview-frame .sm\:flex-row { flex-direction: row; }
  .saybc-preview-frame .sm\:self-center { align-self: center; }
  .saybc-preview-frame .sm\:items-baseline { align-items: baseline; }
  .saybc-preview-frame .sm\:pr-4 { padding-right: 1rem; }
  .saybc-preview-frame .sm\:text-5xl { font-size: 3rem; line-height: 1; }
  .saybc-preview-frame .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .saybc-preview-frame .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .saybc-preview-frame .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .saybc-preview-frame .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .saybc-preview-frame .sm\:\!text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
  .saybc-preview-frame .sm\:\!text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
}

@media (min-width: 768px) {
  .saybc-preview-frame .md\:h-24 { height: 6rem; }
}

/* 6. Preview Studio Frame & Diff View */
.saybc-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: #0d0d0d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.saybc-preview-canvas {
  flex: 1;
  overflow-y: auto;
  background: #1a1a1a;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.saybc-preview-frame {
  width: 100%;
  background: var(--color-cream, #f6f4ef);
  color: #111111;
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transition: max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.saybc-preview-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: #0d0d0d;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.saybc-segmented-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #1c1c1c;
  padding: 0.25rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.saybc-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.saybc-seg-btn:hover {
  color: #ffffff;
}

.saybc-seg-btn[aria-pressed="true"] {
  background: var(--color-gold, #d4af37);
  color: #111111;
}

/* 7. Supplemental Utility Polyfills for Modular Vanilla & Dashboard Cards */
.saybc-badge-slate { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.bg-amber-50 { background-color: #fffbeb; }
.border-amber-200 { border-color: #fde68a; }
.text-amber-800 { color: #92400e; }
.text-amber-900 { color: #78350f; }
.text-amber-950 { color: #451a03; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2\.5 { gap: 0.625rem; }
.p-3\.5 { padding: 0.875rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pb-1 { padding-bottom: 0.25rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.text-\[9px\] { font-size: 9px; line-height: 1.2; }
.text-\[10px\] { font-size: 10px; line-height: 1.3; }
.text-\[11px\] { font-size: 11px; line-height: 1.4; }
.text-\[14px\] { font-size: 14px; line-height: 1.5; }
.rounded-\[2px\] { border-radius: 2px; }
.rounded-\[2rem\] { border-radius: 2rem; }
.aspect-\[16\/9\] { aspect-ratio: 16 / 9; }
.disabled\:bg-gray-100:disabled { background-color: #f3f4f6; }
.disabled\:bg-gray-200:disabled { background-color: #e5e7eb; }
.disabled\:text-gray-400:disabled { color: #9ca3af; }
.disabled\:text-gray-500:disabled { color: #6b7280; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
@media (min-width: 1024px) {
  .lg\:grid-cols-\[1fr_360px\] { grid-template-columns: minmax(0, 1fr) 360px; }
}

/* 8. Unified Dialog / Modal Chrome, Login Controls, Tables & Restrained Editorial Surfaces */
.saybc-modal-header,
.saybc-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.saybc-modal-body,
.saybc-dialog-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.saybc-modal-footer,
.saybc-dialog-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #fafaf8;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.saybc-modal-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

@media (max-width: 639px) {
  .saybc-modal-footer,
  .saybc-dialog-footer {
    padding: 0.875rem 1rem;
  }
  .saybc-modal-header,
  .saybc-dialog-header,
  .saybc-modal-body,
  .saybc-dialog-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .saybc-modal-actions-right {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

/* Login form & password eye toggle precision */
.saybc-login-input {
  width: 100%;
  box-sizing: border-box;
  min-block-size: 3rem;
  border-radius: 0.625rem;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.saybc-login-input--with-toggle {
  padding-right: 3.125rem;
}

.saybc-login-input:focus {
  outline: none;
  border-color: var(--color-gold, #d4af37);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.saybc-eye-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.saybc-eye-btn:hover {
  color: #111827;
  background-color: #f3f4f6;
}

.saybc-eye-btn:focus-visible {
  outline: 2px solid #0b57d0;
  outline-offset: 1px;
}

/* Restraint panels, cards & editorial KPI cards */
.saybc-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.saybc-subpanel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
}

.saybc-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 1.125rem;
  color: #111827;
  transition: border-color 0.15s ease;
}

.saybc-kpi-card[data-tone="gold"],
.saybc-kpi-card[data-tone="green"],
.saybc-kpi-card[data-tone="blue"],
.saybc-kpi-card[data-tone="orange"],
.saybc-kpi-card[data-tone="neutral"] {
  border-color: #e5e7eb;
}

/* Standard padded admin tables (Audit, Members, Extracted, RSVPs) */
.saybc-clean-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.saybc-clean-table th,
.saybc-clean-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.saybc-clean-table thead th {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  background: #fafaf8;
  border-bottom: 1px solid #d1d5db;
  white-space: nowrap;
}

.saybc-clean-table tbody tr:hover td {
  background: #fafaf8;
}

/* Compiled-CSS safety polyfills */
.saybc-badge-gray { background-color: #f3f4f6; color: #374151; border-color: #e5e7eb; }
.right-3 { right: 0.75rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.p-1\.5 { padding: 0.375rem; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.w-28 { width: 7rem; }
.max-w-lg { max-width: 32rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.opacity-85 { opacity: 0.85; }
.hover\:opacity-100:hover { opacity: 1; }
.duration-200 { transition-duration: 200ms; }
.bg-\[\#111111\] { background-color: #111111; }
.text-emerald-700 { color: #047857; }
.\!items-start { align-items: flex-start !important; }
.hover\:text-gray-900:hover { color: #111827; }
.hover\:bg-gray-900:hover { background-color: #111827; }
.focus\:ring-\[var\(--color-gold\)\]:focus { --tw-ring-color: var(--color-gold, #d4af37); }

@media (min-width: 640px) {
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:items-start { align-items: flex-start; }
  .sm\:\!items-center { align-items: center !important; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:grid-cols-\[1fr_180px\] { grid-template-columns: minmax(0, 1fr) 180px; }
}

@media (min-width: 768px) {
  .md\:w-72 { width: 18rem; }
}

/* 9. Editorial Workspace Polish, Mobile Drawer, Card Footers & Master Admin Action Bars */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.saybc-details-grid-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .saybc-details-grid-event {
    grid-template-columns: minmax(0, 1fr) 168px;
  }
}

.saybc-mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  min-block-size: 2.125rem;
  border-radius: 0.5rem;
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.saybc-mobile-nav-toggle:hover {
  background: #27272a;
}

.saybc-workspace-sidebar {
  display: none;
}

.saybc-workspace-sidebar[data-mobile-open="true"] {
  display: block;
}

@media (min-width: 1024px) {
  .saybc-mobile-nav-toggle {
    display: none;
  }
  .saybc-workspace-sidebar {
    display: block;
  }
}

.saybc-card-footer {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid #eef0f3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 0.75rem;
}

.saybc-card-footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.saybc-card-footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.saybc-admin-bar {
  margin-top: 0.875rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
}

.saybc-admin-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
}

.saybc-admin-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.saybc-review-disclosure {
  margin-top: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  background: #f9fafb;
}

.saybc-review-disclosure > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.625rem 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1f2937;
}

.saybc-review-disclosure > summary::-webkit-details-marker {
  display: none;
}

.saybc-review-disclosure-body {
  padding: 0 0.875rem 0.875rem;
  border-top: 1px solid #e5e7eb;
}

.saybc-checkbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.625rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  background: #f9fafb;
}

@media (min-width: 640px) {
  .saybc-checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.saybc-edit-active-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0.625rem;
  border: 1px solid #dfd09e;
  background: #fbf7ea;
  color: #74560f;
  font-size: 0.8125rem;
  font-weight: 700;
}

@media (max-width: 639px) {
  .saybc-card-footer-right,
  .saybc-admin-bar-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .saybc-approvals-toolbar > div:last-child {
    width: 100%;
  }
  .saybc-approvals-toolbar input[type="search"],
  .saybc-approvals-toolbar select {
    width: 100% !important;
    flex: 1 1 140px;
  }
}

/* Polyfills for utility classes referenced outside compiled Tailwind bundle */
.opacity-50 {
  opacity: 0.5;
}

@media (min-width: 640px) {
  .sm\:px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .sm\:py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .lg\:justify-between {
    justify-content: space-between;
  }
}

@media (pointer: coarse) {
  .saybc-btn,
  .saybc-btn-sm,
  .filter-tab,
  .saybc-form-actions button,
  .saybc-notif-bell,
  .saybc-user-trigger,
  .saybc-mobile-nav-toggle {
    min-block-size: 44px;
  }
}

.saybc-btn,
.saybc-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.saybc-btn svg,
.saybc-badge svg {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Extended UI utility polyfills outside Vite CSS bundle */
.bg-\[\#f7f7f5\] { background-color: #f7f7f5; }
.max-w-\[1440px\] { max-width: 1440px; }
.bg-gray-50\/70 { background-color: rgba(249, 250, 251, 0.7); }
.bg-gray-50\/60 { background-color: rgba(249, 250, 251, 0.6); }
.hover\:bg-gray-100\/70:hover { background-color: rgba(243, 244, 246, 0.75); }
.hover\:border-gray-300:hover { border-color: #d1d5db; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.border-l-red-500 { border-left-color: #ef4444; }
.border-l-green-500 { border-left-color: #22c55e; }
.mb-3\.5 { margin-bottom: 0.875rem; }
.space-y-0\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.125rem; }
.bg-emerald-50 { background-color: #ecfdf5; }
.border-emerald-200 { border-color: #a7f3d0; }

@media (min-width: 640px) {
  .sm\:inline { display: inline; }
}

@media (min-width: 768px) {
  .md\:py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
}

/* Real live header inside Preview Studio stays inline within scrollable preview canvas */
#preview-real-header-slot > header,
#preview-stage-container header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 20 !important;
}

/* Shared Gallery Dropzone, Draggable Cards, Lightbox & Slideshow */
.saybc-dropzone {
  border: 1.5px dashed #d1d5db;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.saybc-dropzone[data-drag-active="true"] {
  border-color: #d97706;
  background: #fffbeb;
}

.saybc-gallery-card {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 140ms ease, opacity 140ms ease;
}

.saybc-gallery-card[data-dragging="true"] {
  opacity: 0.5;
}

.saybc-gallery-card[data-drop-target="true"] {
  border-color: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.saybc-lightbox-dialog {
  width: min(94vw, 1080px);
  max-height: 92vh;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.875rem;
  background: #111111;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.saybc-lightbox-dialog::backdrop {
  background: rgba(9, 9, 11, 0.8);
}

.saybc-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  max-height: 68vh;
  background: #0a0a0b;
  overflow: auto;
  padding: 1rem;
  position: relative;
}

.saybc-lightbox-img {
  max-width: 100%;
  max-height: 64vh;
  object-fit: contain;
  border-radius: 0.375rem;
  user-select: none;
}

.saybc-lightbox-img[data-zoomed="true"] {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.saybc-lightbox-img[data-zoomed="false"] {
  cursor: zoom-in;
}

/* Interactive Native-Style SAYBC Slideshow (matches Home Gallery / Projects) */
.saybc-slideshow {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 1.5rem;
  background: #111111;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.14);
  user-select: none;
}

.saybc-slideshow-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saybc-slideshow-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 260ms ease, transform 500ms ease;
}

.saybc-slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease, color 180ms ease, opacity 220ms ease, transform 180ms ease;
}

@media (hover: hover) {
  .saybc-slideshow-nav {
    opacity: 0;
  }
  .saybc-slideshow:hover .saybc-slideshow-nav,
  .saybc-slideshow:focus-within .saybc-slideshow-nav {
    opacity: 1;
  }
}

.saybc-slideshow-nav:hover,
.saybc-slideshow-nav:focus-visible {
  background: var(--color-gold, #f5c400);
  color: #111111;
  border-color: transparent;
  outline: none;
}

.saybc-slideshow-nav-prev { left: 1rem; }
.saybc-slideshow-nav-next { right: 1rem; }

.saybc-slideshow-scrim {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 8;
  padding: 2.25rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.64) 0%, rgba(0, 0, 0, 0.18) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  pointer-events: none;
}

.saybc-slideshow-caption {
  max-width: 92%;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.saybc-slideshow-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  pointer-events: auto;
}

.saybc-slideshow-dot {
  height: 8px;
  width: 8px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: width 260ms ease, background-color 180ms ease;
}

.saybc-slideshow-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

.saybc-slideshow-dot[data-active="true"] {
  width: 30px;
  background: var(--color-gold, #f5c400);
}

/* Missing Tailwind v3 utility polyfills for dynamic bundles */
.aspect-video { aspect-ratio: 16 / 9; }
.gap-2\.5 { gap: 0.625rem; }

/* Prevent real site header/footer from causing horizontal overflow inside the Preview Studio frame */
#preview-real-header-slot,
#preview-real-footer-slot {
  max-width: 100%;
  overflow: hidden;
}

#preview-real-header-slot header,
#preview-real-footer-slot footer {
  max-width: 100% !important;
  overflow: hidden;
}

#preview-real-header-slot .container,
#preview-real-footer-slot .container {
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: clamp(0.75rem, 1.5vw, 1.5rem) !important;
}

#preview-real-header-slot nav {
  gap: clamp(0.45rem, 0.95vw, 1.25rem) !important;
  flex-wrap: wrap;
}

/* Members Table 2x2 Responsive Row Actions Grid */
.saybc-member-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(5.25rem, 1fr));
  gap: 0.375rem;
  align-items: stretch;
  inline-size: 100%;
  max-inline-size: 13.5rem;
}

.saybc-member-actions-grid > .saybc-btn {
  inline-size: 100%;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

@container (width < 600px) {
  .saybc-member-actions-grid {
    max-inline-size: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (width < 340px) {
  .saybc-member-actions-grid {
    grid-template-columns: 1fr;
  }
}

.saybc-workspace-grid {
  overflow-anchor: none;
}

@media (min-width: 1024px) {
  .saybc-workspace-sidebar {
    position: sticky;
    top: 7.5rem;
    align-self: start;
    max-block-size: calc(100dvh - 8.25rem);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

/* Members Pagination Controls (modern-web-guidance: typography — min-block-size on buttons) */
.saybc-pagination-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  margin-top: 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

@media (min-width: 640px) {
  .saybc-pagination-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.saybc-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 2.125rem;
  min-inline-size: 2.125rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.saybc-page-btn:hover:not(:disabled) {
  border-color: #111827;
  background: #f9fafb;
}

.saybc-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.saybc-page-btn[aria-current="page"],
.saybc-page-btn[data-active="true"] {
  border-color: #111111;
  background: var(--color-gold, #f5c400);
  color: #111111;
  font-weight: 800;
}

/* News Article Balanced H1 & Editorial Typography (modern-web-guidance: typography & improve-text-layout-and-legibility) */
.saybc-article-h1 {
  font-size: clamp(1.65rem, 1.2rem + 1.55vw, 2.5rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.rich-content h2,
.rich-content h3 {
  text-wrap: balance;
}

.rich-content p,
.rich-content li,
.rich-content blockquote {
  text-wrap: pretty;
}


