:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #76963f;
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.mfa-enrollment {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.mfa-qr {
  width: min(14rem, 100%);
  height: auto;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--line, #c9c2b4);
}

.mfa-enrollment code {
  overflow-wrap: anywhere;
  user-select: all;
}

.hidden { display: none !important; }
.mobile-nav-close { display: none; }
@media (max-width: 800px) {
  .mobile-nav-close {
    display: block;
    align-self: flex-end;
    margin: -12px -4px 8px 0;
    font-size: 11px;
  }
  .mobile-overlay.visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 4;
    max-width: none;
    margin: 0;
    padding: 0;
    background: rgba(35, 36, 32, .42);
  }
}
.form-error { color: #913d3d; background: #f8e6e3; border-left: 3px solid #b55252; padding: 10px 12px; }
.form-hint { color: #77736b; font-size: 11px; }

/* The demo is deliberately self-contained: these styles never imply a live state. */
.demo-frame { min-height: 100vh; background: #f4f1ea; color: #252521; }
.demo-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 5%; border-bottom: 1px solid #d9d3c8; background: #fbfaf7; }
.demo-header a { color: #58752c; font-size: 12px; font-weight: 700; }
.demo-main { width: min(1100px, 90%); margin: 0 auto; padding: 42px 0 80px; }
.demo-banner { margin-bottom: 22px; padding: 24px 26px; border: 1px solid #cbd9a9; border-left: 5px solid #718c3a; background: #eef5df; }
.demo-banner h1 { margin: 3px 0 7px; font-size: clamp(24px, 4vw, 38px); }
.demo-banner p:last-child { max-width: 780px; margin: 0; color: #4e5c39; line-height: 1.55; }
.demo-mode-switch, .demo-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.demo-mode-switch { margin: 0 0 28px; }
.demo-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.demo-heading h2 { margin: 0; }
.demo-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.demo-metric { display: grid; gap: 5px; padding: 17px; border: 1px solid #dfd9ce; background: #fff; }
.demo-metric span, .demo-metric small, .demo-small { color: #77736b; font-size: 11px; }
.demo-metric strong { font-size: 25px; }
.demo-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.demo-card { min-width: 0; }
.demo-card > p { line-height: 1.55; }
.demo-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 20px 0; padding: 12px; background: #f7f5f0; font-size: 12px; }
.demo-detail span { color: #77736b; }
.demo-timeline { display: grid; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; color: #77736b; font-size: 12px; }
.demo-timeline li { display: flex; align-items: center; gap: 9px; }
.demo-timeline li span { width: 9px; height: 9px; border-radius: 50%; background: #c7c2b8; }
.demo-timeline li.complete { color: #40552b; }
.demo-timeline li.complete span { background: #718c3a; box-shadow: 0 0 0 3px #e1eacb; }
.demo-actions { margin-top: 18px; }

.field-label { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; font-size: 12px; font-weight: 600; }
.field-label :where(input, select, textarea),
.withdraw-grid :where(input, select) {
  width: 100%; border: 1px solid #d2cdc2; background: #fff; color: #252521;
  border-radius: 2px; padding: 11px 12px; font: 13px Inter, sans-serif;
}
.field-label textarea { resize: vertical; min-height: 82px; }
.withdraw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-actions, .queue-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

.submission-layout, .balance-layout, .settings-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: 16px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.video-card { min-width: 0; border: 1px solid #dfd9ce; background: #fff; padding: 10px; text-align: left; display: flex; flex-direction: column; gap: 7px; color: inherit; }
button.video-card { cursor: pointer; }
.video-card.selected { border-color: #58752c; box-shadow: inset 0 0 0 1px #58752c; }
.video-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #d9d4ca; }
.video-card strong { overflow-wrap: anywhere; font-size: 12px; }
.video-card small, .picker-note span { color: #817e76; font-size: 10px; }
.picker-note { border: 1px dashed #cbc5b9; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.connect-panel { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.withdrawal-history-panel { margin-top: 16px; }
.withdrawal-history-list { display: grid; gap: 10px; }
.withdrawal-history-card { border: 1px solid #dfd9ce; background: #fff; padding: 14px; }
.withdrawal-history-summary, .withdrawal-history-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.withdrawal-history-summary > div { min-width: 0; display: grid; gap: 4px; }
.withdrawal-history-summary strong { font-size: 16px; }
.withdrawal-history-summary span, .withdrawal-history-meta { color: #77736b; font-size: 11px; overflow-wrap: anywhere; }
.withdrawal-history-meta { justify-content: flex-start; margin-top: 8px; }
.withdrawal-history-details { margin-top: 12px; border-top: 1px solid #ebe6dc; padding-top: 10px; }
.withdrawal-history-details summary { cursor: pointer; color: #58752c; font-size: 11px; font-weight: 600; }
.withdrawal-history-details ol { display: grid; gap: 9px; margin: 10px 0 0; padding-left: 20px; }
.withdrawal-history-details li { display: flex; justify-content: space-between; gap: 12px; color: #77736b; font-size: 11px; }
.withdrawal-history-details li > div { display: grid; gap: 2px; }
.withdrawal-history-details li strong { color: #252521; font-size: 11px; }
.withdrawal-history-details li small { color: #77736b; }
.withdrawal-history-details time { white-space: nowrap; }

.admin-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 0 14px; margin: 0 0 18px; scrollbar-width: thin; }
.admin-tab { white-space: nowrap; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 10px 12px; color: #68665f; cursor: pointer; font: 600 11px Inter, sans-serif; }
.admin-tab.active { color: #252521; border-color: #718c3a; }
.admin-queue { overflow: hidden; }
.admin-queue > .table-row, button.table-row { width: 100%; text-align: left; background: transparent; color: inherit; border-right: 0; border-left: 0; border-bottom: 0; cursor: pointer; }
.table-row.selected, .nested-panel.selected { background: #f2f6e9; box-shadow: inset 3px 0 #718c3a; }
.nested-panel { margin: 12px 0; display: grid; gap: 10px; }
.nested-panel > .table-heading, .nested-panel > .table-row { grid-template-columns: 1fr 1fr .6fr; }
.admin-campaign-row { grid-template-columns: minmax(180px, 2fr) 1fr auto auto; }

@media (max-width: 800px) {
  .demo-main { width: 92%; padding-top: 28px; }
  .demo-header { padding-inline: 4%; }
  .demo-columns, .demo-metric-grid { grid-template-columns: 1fr; }
  .demo-heading { flex-direction: column; }
  .demo-banner { padding: 19px; }
  .app-frame { display: block; }
  .submission-layout, .balance-layout, .settings-layout { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .withdraw-grid { grid-template-columns: 1fr; }
  .connect-panel { align-items: stretch; flex-direction: column; }
  .admin-main { padding-inline: 4%; }
  .admin-campaign-row { grid-template-columns: 1fr auto; }
  .nested-panel > .table-row { grid-template-columns: 1fr; overflow-wrap: anywhere; }
}

@media (max-width: 430px) {
  .video-grid { grid-template-columns: 1fr; }
  .panel { padding: 17px; }
  .button { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
