/* STX Vets – last-in general fixes */

body.page-body {
  background: var(--bg-gradient, var(--bg)) !important;
  color: var(--text-main) !important;
  font-family: var(--font-main, system-ui, -apple-system, "SF Pro Text", sans-serif);
}

/* Anchor sanity */
a,
a:visited {
  color: var(--link-normal);
  text-decoration-color: currentColor;
}
a:hover {
  color: var(--link-hover);
}

.site-main a:not(.btn):not(.btn-pill):not(.pill-button),
.site-main a:not(.btn):not(.btn-pill):not(.pill-button):visited {
  color: var(--link-normal);
  text-decoration: underline;
}
.site-main a:not(.btn):not(.btn-pill):not(.pill-button):hover {
  color: var(--link-hover);
}

.section--hero .hero-cta .button--primary,
.section--hero .hero-cta .button--primary:visited {
  color: #ffffff !important;
}

.btn,
.btn-pill,
.pill-button {
  text-decoration: none;
}

/* Keyboard focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 0.4rem;
}

/* Heading colors in light mode, but hero stays inverted */
[data-theme="light"] .site-main h1,
[data-theme="light"] .site-main h2,
[data-theme="light"] .site-main h3,
[data-theme="light"] .site-main h4 {
  color: #0f172a;
}
[data-theme="light"] .hero-panel h1,
[data-theme="light"] .hero-panel h2,
[data-theme="light"] .hero-panel h3 {
  color: #f9fafb;
}

/* Offset anchor scroll for sticky header */
.site-main {
  scroll-margin-top: 72px;
}

/* Document library */
.document-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.document-card {
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  background: rgba(248, 250, 252, 0.95);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  position: relative;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.06);
}
[data-theme="dark"] .document-card {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.3);
}
.document-card__media img {
  width: 100%;
  border-radius: 0.85rem;
  object-fit: cover;
  max-height: 200px;
}
.document-card__eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}
.document-card__meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}
.document-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.document-card-empty {
  text-align: center;
  color: var(--text-muted);
  margin: 1rem 0;
}

.document-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.document-modal[hidden] {
  display: none;
}
.document-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
}
.document-modal__panel {
  position: relative;
  background: var(--bg, #ffffff);
  border-radius: 1.5rem;
  max-width: 860px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.2);
}
.document-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: inherit;
  cursor: pointer;
}
.document-modal__header h3 {
  margin-bottom: 0.25rem;
}
.document-modal__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.document-modal__description {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.document-modal__message {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.document-modal__message[data-tone="error"] {
  color: #dc2626;
}
.document-modal__message[data-tone="success"] {
  color: #0f9d58;
}
.document-version {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.document-version__header {
  margin-bottom: 0.75rem;
}
.document-version__notes {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.document-version__assets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.document-asset {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.75rem;
}
.document-asset__info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.document-asset__info span {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.document-asset__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.document-asset__select {
  display: flex;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.document-modal__bundle {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Admin document manager */
.admin-doc-card {
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(248, 250, 252, 0.9);
}
[data-theme="dark"] .admin-doc-card {
  background: rgba(15, 23, 42, 0.8);
}
.admin-doc-collapse {
  display: block;
}
.admin-doc-collapse summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  list-style: none;
  cursor: pointer;
}
.admin-doc-collapse summary::-webkit-details-marker {
  display: none;
}
.admin-doc-summary__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.doc-file-overview {
  margin-top: 0.35rem;
}
.doc-file-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.doc-file-row .admin-meta {
  margin: 0;
  min-width: 90px;
  flex: 0 0 auto;
}
.doc-format-chips,
.doc-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.chip--format {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
  font-weight: 600;
}
.chip--format-primary {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.55);
  color: #065f46;
}
.chip-flag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.35rem;
  color: inherit;
}
.chip-tally {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.chip--soft {
  background: rgba(37, 99, 235, 0.12);
  color: var(--text-main);
}
.fabrication-section .fabrication-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: stretch;
}
.fabrication-section ul {
  margin-top: 0.75rem;
}
.fabrication-card {
  flex: 1 1 280px;
  border-radius: 1.25rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, #081124 0%, #13357c 55%, #3cbefc 100%);
  color: #fdfdff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}
.fabrication-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(8, 12, 27, 0.9) 0%, rgba(8, 12, 27, 0.45) 50%, rgba(8, 12, 27, 0.15) 100%);
  pointer-events: none;
}
.fabrication-card > * {
  position: relative;
  z-index: 1;
}
.fabrication-flag {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(248, 250, 252, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}
.fabrication-motto {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1rem 0 0.75rem;
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 10px 22px rgba(0,0,0,0.45);
  background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(221, 225, 234, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fabrication-stats {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}
.fabrication-stats li {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.95rem;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  color: #fdfdff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 12px 30px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.18);
}
.fabrication-stat__value {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.fabrication-stat__value strong {
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.fabrication-stat__value span {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.95);
}
.fabrication-stat__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: rgba(245, 252, 255, 0.9);
}
.fabrication-note {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: #e3f2ff;
  font-weight: 500;
  position: relative;
  z-index: 1;
  text-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
.admin-doc-card__body {
  margin-top: 1rem;
}
.admin-doc-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.form-field--full {
  grid-column: 1 / -1;
}
.admin-form-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.admin-form-column {
  flex: 2 1 460px;
}
.admin-preview-column {
  flex: 1 1 320px;
}
.admin-preview-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.preview-control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.preview-toggle-group {
  display: inline-flex;
  gap: 0.35rem;
}
.preview-toggle {
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-main);
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.preview-toggle--active,
.preview-toggle:hover {
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.15);
}
.document-card--preview {
  opacity: 0.98;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #f8fafc;
}
.document-card--preview h3 {
  color: #0f172a;
}
.document-card--preview .document-card__body {
  padding-top: 0;
}
.document-card--preview .document-card__media {
  background: #fff;
  padding: 0.65rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: 0.85rem;
}
.document-card--preview button {
  pointer-events: none;
}
.document-card--preview .btn {
  border-radius: 999px;
}
.document-card--preview .btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.document-card--preview .btn-secondary {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
}
.document-card--preview .document-card__meta {
  color: #475569;
}
.document-card--preview.preview-theme-dark {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.document-card--preview.preview-theme-dark .document-card__meta,
.document-card--preview.preview-theme-dark .document-card__description,
.document-card--preview.preview-theme-dark .document-card__eyebrow {
  color: rgba(248, 250, 252, 0.85);
}
.document-card--preview.preview-theme-dark .document-card__media {
  background: #111827;
  border-color: rgba(248, 250, 252, 0.1);
}
.document-card--preview.preview-theme-dark h3 {
  color: #fff;
}
.document-card--preview.preview-theme-dark .btn-primary {
  background: #2563eb;
  color: #fff;
}
.document-card--preview.preview-theme-dark .btn-secondary {
  background: rgba(248, 250, 252, 0.1);
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.2);
}
.document-card--preview.preview-theme-dark .document-card__meta {
  color: rgba(248, 250, 252, 0.75);
}
.document-card--preview.preview-theme-dark .btn-secondary:hover {
  background: rgba(248, 250, 252, 0.2);
}
.preview-missing {
  opacity: 0.5;
  font-style: italic;
}
.admin-preview__placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  min-height: 140px;
}
.admin-preview__placeholder p {
  font-weight: 600;
  margin: 0;
}
.admin-preview__placeholder small {
  color: var(--text-muted);
}
.multi-input {
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.multi-input__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.multi-chip {
  background: rgba(37, 99, 235, 0.15);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
}
.multi-chip__remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.multi-input__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.multi-input__field {
  flex: 1 1 220px;
  min-width: 160px;
}
.multi-input__picker {
  flex: 1 1 180px;
}
.form-hint--subtle {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.admin-preview-callouts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-preview-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-preview-legend li {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 0.65rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-preview-legend strong {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-preview-legend span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.admin-preview-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.doc-dropzone-wrapper {
  margin-bottom: 1rem;
}
.doc-dropzone {
  border: 2px dashed rgba(37, 99, 235, 0.4);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.doc-dropzone.is-dragover {
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.05);
}
.doc-dropzone .link-btn {
  border: none;
  background: none;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}
.doc-dropzone__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.doc-dropzone__status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--brand);
}
.admin-preview-inline {
  font-size: 0.85rem;
  color: var(--brand, #2563eb);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 0.45rem;
  padding: 0.5rem;
}
.admin-callout {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px dashed var(--border-subtle);
  border-radius: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.admin-callout--info {
  border-style: solid;
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  flex-direction: column;
  align-items: flex-start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 0.4rem;
}
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.hint-badge {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  border: none;
  background: var(--brand, #2563eb);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}
.hint-badge::after {
  content: attr(data-hint);
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translate(-50%, -8px);
  background: #0f172a;
  color: #fff;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  width: min(220px, 70vw);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}
.hint-badge:hover::after,
.hint-badge:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -15px);
}
.hint-badge:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.field-with-picker .field-picker {
  margin-top: 0.25rem;
  width: 100%;
}
.field-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.field-pair label {
  flex: 1 1 240px;
}
.form-hint {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  padding: 0.25rem 0;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
}
.description-field {
  width: 100%;
  margin-top: 0.5rem;
}
.description-field__input {
  width: 100%;
  min-height: 140px;
  resize: vertical;
}
.history-custom-field {
  margin-top: 0.35rem;
  transition: opacity 0.2s ease;
}
.history-custom-field[data-disabled="true"] {
  opacity: 0.45;
}
.form-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-doc-section {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  margin: 1rem 0;
  padding: 1rem;
}
.preview-highlight {
  animation: previewPulse 1.2s ease;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}
@keyframes previewPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  100% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}
.admin-doc-section summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.admin-version-card {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 1rem;
  padding: 0.5rem 1rem 1rem;
  margin-bottom: 1rem;
}
.admin-version-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.admin-version-card summary::-webkit-details-marker {
  display: none;
}
.admin-version-card[open] > summary {
  margin-bottom: 0.5rem;
}
.admin-version-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-version-card header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.admin-version-actions,
.admin-rule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.admin-assets {
  border-top: 1px dashed var(--border-subtle);
  margin-top: 1rem;
  padding-top: 1rem;
}
.admin-asset-wrapper {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.85rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}
.admin-asset-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 0.5rem;
}
.admin-rule-form {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0.85rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}
.admin-table-scroll {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem;
  text-align: left;
}

@media (max-width: 960px) {
  .admin-form-layout {
    flex-direction: column;
  }
  .admin-preview-column {
    flex-basis: 100%;
  }
}
.admin-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.inline-form {
  margin-top: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-main);
  border: 1px solid transparent;
}
.chip--on {
  background: rgba(56, 189, 248, 0.2);
  color: var(--brand);
}
.chip--off {
  background: rgba(248, 113, 113, 0.2);
  color: #b91c1c;
}
.thumbnail-upload {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.thumbnail-preview {
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.thumbnail-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 0.65rem;
}
.thumbnail-preview__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* Admin feature toggles */
.feature-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.feature-toggle {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.02);
}

[data-theme="dark"] .feature-toggle {
  background: rgba(148, 163, 184, 0.05);
  border-color: rgba(148, 163, 184, 0.2);
}

.feature-toggle__meta {
  flex: 2;
  min-width: 240px;
}

.feature-toggle__category {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
  color: var(--text-muted);
}

.feature-toggle__meta h4 {
  margin: 0 0 0.4rem;
}

.feature-toggle__description {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}

.feature-toggle__form {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

/* PatriotChat signal */
.patriotchat-signal {
  position: relative;
  z-index: 0;
}

.patriotchat-card {
  border-radius: 1.75rem;
  padding: 2rem;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.35), rgba(15, 23, 42, 0.95));
  color: #f8fafc;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

[data-theme="light"] .patriotchat-card {
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.4), rgba(30, 64, 175, 0.9));
  color: #f9fafb;
}

.patriotchat-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
}

.patriotchat-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: rgba(248, 250, 252, 0.7);
  margin: 0 0 0.5rem;
}

.patriotchat-card__subtitle {
  margin: 0.4rem 0 0;
  color: rgba(248, 250, 252, 0.85);
}

.patriotchat-card__cta {
  background: rgba(248, 250, 252, 0.12);
  border: 1px solid rgba(248, 250, 252, 0.3);
  color: #fff;
}

.patriotchat-card__cta:hover {
  background: rgba(248, 250, 252, 0.25);
}

.patriotchat-stream {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.patriotchat-post {
  border-radius: 1.1rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(248, 250, 252, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

[data-theme="light"] .patriotchat-post {
  background: rgba(15, 23, 42, 0.35);
}

.patriotchat-post__badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.patriotchat-post__flag {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.15);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.patriotchat-post__handle {
  margin: 0;
  font-weight: 600;
}

.patriotchat-post__tag {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.65);
}

.patriotchat-post__message {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.patriotchat-post__meta {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.7);
}

.patriotchat-empty {
  color: rgba(248, 250, 252, 0.85);
  font-size: 0.95rem;
}

.patriotchat-card__footer {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.7);
}

@media (max-width: 640px) {
  .patriotchat-card {
    padding: 1.5rem;
  }
  .patriotchat-stream {
    grid-template-columns: 1fr;
  }
}
