:root {
  --bg: #0b1120;
  --panel: #121a2b;
  --panel-2: #182236;
  --border: #263149;
  --text: #e6edf7;
  --muted: #8fa0bd;
  --primary: #38bdf8;
  --primary-2: #0ea5e9;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 20% -10%, #17233d 0%, var(--bg) 55%);
  color: var(--text);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.06), transparent 3px), rgba(11, 17, 32, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 6px 20px rgba(2, 6, 16, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #04121f;
  font-weight: 800;
  display: grid;
  place-items: center;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.22);
}
.brand h1 {
  font-size: 17px;
  letter-spacing: 0.01em;
}
.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.topbar-actions {
  display: flex;
  gap: 8px;
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  padding: 20px 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel) 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  transition: border-color 0.15s ease;
}
.panel:hover {
  border-color: #303d59;
}
.panel h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.field {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
}
.field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}
.field input[type='range'] {
  width: 100%;
  accent-color: var(--primary);
}

select,
input[type='text'],
input[type='password'],
textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
select:hover,
input[type='text']:hover,
input[type='password']:hover,
textarea:hover {
  border-color: #303d59;
}
textarea {
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(56, 189, 248, 0.35);
  outline-offset: 1px;
  border-color: var(--primary);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 12px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.row-between .link {
  font-size: 11px;
}

.progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  margin-left: 12px;
  flex-basis: 100%;
  accent-color: var(--primary);
}
.progress.hidden {
  display: none;
}

.btn {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 14px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn:not(:disabled):active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--primary-2);
  color: #04121f;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
}
.btn-primary:not(:disabled):hover {
  background: var(--primary);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:not(:disabled):hover {
  background: var(--panel-2);
}
.btn-warn {
  background: transparent;
  border-color: var(--warn);
  color: var(--warn);
}
.btn-warn:not(:disabled):hover {
  background: rgba(245, 158, 11, 0.12);
}
.link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  padding: 0;
}

.provider-order {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.provider-order li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 13px;
}
.provider-order .name {
  flex: 1;
}
.provider-order .count {
  color: var(--muted);
  font-size: 11px;
}
.icon-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}
.icon-btn:hover {
  color: var(--text);
}
.provider-order input[type='checkbox'] {
  accent-color: var(--primary);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  background: rgba(18, 26, 43, 0.6);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.dropzone:hover {
  border-color: #3a4763;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(2, 6, 16, 0.32);
}
.dropzone.dragover {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.08);
}
.dropzone p {
  margin: 4px 0;
}
.dropzone-icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
  margin-bottom: 10px;
  opacity: 0.9;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.stats {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
}

.item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.item:hover {
  border-color: #303d59;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(2, 6, 16, 0.3);
}
.item-thumb {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
}
.item-body {
  min-width: 0;
}
.item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.item-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.badge {
  font-size: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge.good {
  color: var(--good);
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}
.badge.quota {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}
.badge.invalid,
.badge.failed {
  color: var(--bad);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}
.badge.working {
  color: var(--primary);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

.item-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.item-fields .wide {
  grid-column: 1 / -1;
}
.item-fields label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 3px;
}
.item-fields input,
.item-fields textarea {
  font-size: 12px;
  padding: 6px 8px;
}
.item-fields textarea {
  min-height: 52px;
}
.item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.item-error {
  color: var(--bad);
  font-size: 12px;
  margin-top: 8px;
  grid-column: 1 / -1;
}
.item-note {
  color: var(--warn);
  font-size: 11px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
}
.modal.hidden,
.hidden {
  display: none;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  overflow: auto;
  padding: 20px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0;
}
.tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 13px;
  color: var(--muted);
}
.tab.active {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
}
.add-key {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.add-key input {
  flex: 1;
}
.key-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.key-mask {
  flex: 1;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.toast.good {
  border-color: rgba(34, 197, 94, 0.5);
}
.toast.bad {
  border-color: rgba(239, 68, 68, 0.5);
}

.ss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ss-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.ss-toggles label,
.check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0;
}
.item-fields .ss-toggles label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--text);
}
.ss-toggles input[type='checkbox'] {
  accent-color: var(--primary);
}
.ss-toggles + .btn {
  margin-top: 12px;
}

.marketplace-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.marketplace-tabs .tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}
.marketplace-tabs .tab-btn + .tab-btn {
  border-left: 1px solid var(--border);
}
.marketplace-tabs .tab-btn:hover {
  color: var(--text);
}
.marketplace-tabs .tab-btn.active {
  background: rgba(56, 189, 248, 0.14);
  color: var(--text);
}

body.marketplace-adobe .ss-field {
  display: none;
}
body.marketplace-shutterstock .adobe-field {
  display: none;
}

@media (max-width: 780px) {
  .topbar {
    flex-wrap: wrap;
  }
  .topbar-actions {
    flex-wrap: wrap;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(11, 17, 32, 0.8);
  color: var(--muted);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-copy {
  margin: 0;
  font-size: 12px;
  color: var(--text);
}
.footer-credit {
  margin: 0;
  font-size: 12px;
}
.footer-credit a {
  color: var(--primary);
  text-decoration: none;
}
.footer-credit a:hover {
  text-decoration: underline;
}
.footer-credit a:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}
.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.social-link {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  transition: 0.15s ease;
}
.social-link:hover {
  color: var(--primary);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}
.social-link:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}
.social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #35435f;
}

/* ---------------------------------------------------------------------------
   Marketing / SEO pages. Additive only: these classes are used by the static
   content pages and the shared site navigation. No existing selector changes.
--------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-220%);
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.topbar-actions a.btn {
  text-decoration: none;
}
.marketplace-tabs a.tab-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 36px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}
.nav-toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  flex: 1 0 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}
.site-nav a:hover {
  color: var(--text);
}
.site-nav a[aria-current='page'] {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.site-nav-bar {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 17, 32, 0.6);
}
.site-nav-bar .site-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  border-top: none;
}
.site-nav-bar .nav-toggle {
  display: none;
  margin: 10px 24px;
}

.marketing {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}
.marketing .lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 720px;
  margin: 14px 0 22px;
}
.hero {
  padding: 8px 0;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero .lead {
  font-size: 18px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0 8px;
}
.section {
  margin-top: 44px;
}
.section > h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.prose {
  max-width: 780px;
  color: var(--text);
  font-size: 15px;
}
.prose h2 {
  font-size: 22px;
  margin: 34px 0 10px;
}
.prose h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}
.prose h4 {
  font-size: 15px;
  margin: 18px 0 6px;
}
.prose p,
.prose li {
  color: var(--muted);
}
.prose p {
  margin: 10px 0;
}
.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 10px 0;
}
.prose li {
  margin: 4px 0;
}
.prose a {
  color: var(--primary);
}
.prose strong {
  color: var(--text);
}
.prose code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 5px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}
.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--panel-2);
  color: var(--text);
}
.prose td {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel) 60px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 {
  font-size: 15px;
  margin-bottom: 6px;
}
.card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.card p:last-child {
  margin-bottom: 0;
}
.card-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  margin-bottom: 10px;
}

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb li + li::before {
  content: '/';
  margin: 0 8px;
  color: var(--border);
}
.breadcrumb [aria-current='page'] {
  color: var(--text);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px 18px;
  margin: 12px 0;
}
.faq-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cta-band {
  margin-top: 48px;
  text-align: center;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.1), var(--panel) 70%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 20px;
}
.cta-band h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.cta-band p {
  color: var(--muted);
  margin: 0 auto 18px;
  max-width: 620px;
}
.cta-band .cta-row {
  justify-content: center;
}

.footer-brand {
  flex: 1 1 320px;
}
.footer-tagline {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  max-width: 420px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
.footer-nav a:hover {
  color: var(--primary);
}
.footer-note {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.site-footer .footer-inner {
  align-items: flex-start;
}

@media (max-width: 780px) {
  .nav-toggle,
  .site-nav-bar .nav-toggle {
    display: inline-flex;
  }
  .site-nav-bar .site-nav {
    display: none;
  }
  .site-nav-bar .site-nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .site-nav a[aria-current='page'] {
    border-bottom-color: transparent;
  }
}
