* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1d1d1f;
  background: #fff;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Account bar */
#account-bar {
  text-align: right;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.link-btn {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.link-btn:hover { text-decoration: underline; }

.sep { color: #d1d5db; margin: 0 4px; }

.plan-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #e0e7ff;
  color: #3730a3;
  margin: 0 8px;
}

/* Auth modal */
#auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.auth-box {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.auth-box h3 { margin: 0 0 4px; font-size: 1.1em; }

.auth-box input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
}

.auth-box input:focus { border-color: #2563eb; }

.auth-box button:not(.link-btn) {
  padding: 10px;
  font-size: 14px;
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.auth-box button:not(.link-btn):hover { background: #1d4ed8; }

.auth-error { color: #dc2626; font-size: 13px; margin: 0; min-height: 18px; }

.auth-box .link-btn { text-align: center; }

h1 { font-size: 2.2em; font-weight: 700; text-align: center; margin-bottom: 16px; }
h2 { font-size: 1.1em; font-weight: 600; margin-bottom: 8px; }

/* Account panel */
.account-panel-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 13px;
}

.account-panel-box h3 { margin: 0 0 10px; font-size: 15px; }

.endpoint-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}

.endpoint-item code { font-size: 12px; word-break: break-all; }
.endpoint-item .key-label { color: #6b7280; font-size: 11px; margin-top: 4px; }

.usage-text { color: #6b7280; font-size: 12px; margin-top: 8px; }

#upgrade-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.upgrade-label { font-size: 12px; color: #6b7280; margin: 0 0 8px; }
.upgrade-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  cursor: pointer;
}
.upgrade-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.upgrade-btn:disabled { opacity: 0.6; cursor: wait; }

/* Hero — progressive crawl */
.crawl {
  margin-bottom: 16px;
  text-align: center;
}

.crawl p {
  color: #1d1d1f;
  margin: 0;
}

.crawl em { font-style: italic; }

.crawl .line1 { font-size: 0.7em; margin-bottom: 6px; }
.crawl .line2 { font-size: 0.88em; margin-bottom: 8px; }
.crawl .line3 { font-size: 1.0em; margin-bottom: 10px; }
.crawl .line4 { font-size: 1.15em; margin-bottom: 10px; }
.crawl .punchline {
  font-size: 1.4em;
  margin-top: 0;
}

@media (max-width: 520px) {
  .crawl .line1 { font-size: 0.65em; }
  .crawl .line2 { font-size: 0.75em; }
  .crawl .line3 { font-size: 0.85em; }
  .crawl .line4 { font-size: 0.95em; }
  .crawl .punchline { font-size: 1.1em; }
}

@media (min-width: 521px) and (max-width: 900px) {
  .crawl .line3 { font-size: 0.92em; }
  .crawl .line4 { font-size: 1.08em; }
  .crawl .punchline { font-size: 1.25em; }
}

.hero-sub {
  font-size: 0.95em;
  line-height: 1.5;
  color: #4b5563;
  margin-bottom: 28px;
}

.cta-heading {
  text-align: center;
  margin-top: 24px;
}

.below-box {
  text-align: center;
  font-size: 0.85em;
  color: #6b7280;
  margin-top: 12px;
  font-style: italic;
}

.cta-promise {
  font-size: 0.9em;
  color: #6b7280;
  margin-bottom: 12px;
  text-align: center;
}

/* How it works */
.how-it-works {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.step {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.step-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-detail strong { color: #1d1d1f; font-size: 14px; }
.step-detail span { font-size: 12px; color: #9ca3af; }

/* Your data */
.your-data {
  margin: 20px 0 8px;
  padding: 14px 16px;
  background: #f0f7ff;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
}

.your-data strong { color: #2563eb; }

/* Privacy */
.privacy {
  padding: 8px 16px;
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.5;
}

/* Divider */
.divider {
  border-top: 1px solid #e5e7eb;
  margin: 24px 0;
}

/* Drop zone */
#drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

#drop-zone:hover, #drop-zone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.drop-text {
  font-size: 15px;
  color: #374151;
  line-height: 1.5;
}

.drop-or {
  font-size: 13px;
  color: #9ca3af;
  margin: 8px 0;
}

.browse-btn {
  padding: 8px 20px;
  font-size: 14px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.browse-btn:hover { background: #1d4ed8; }

.drop-formats {
  margin-top: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.drop-hints {
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.6;
}

.drop-hints code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* Progress */
.progress-box {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-size: 15px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Summary stats */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: #f0f7ff;
  padding: 14px 8px;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.4em;
  font-weight: 700;
  color: #2563eb;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Results table */
#preview-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.table-scroll {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

#results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#results-table thead { position: sticky; top: 0; }

#results-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
  background: #f9fafb;
}

#results-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
}

#results-table tr:hover td { background: #f9fafb; }
#results-table td:nth-child(2) { font-weight: 600; }

/* Actions */
.actions-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.activate-email-input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 250px;
  outline: none;
}

.activate-email-input:focus { border-color: #2563eb; }

.actions-row button {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}

.actions-row button:hover { background: #1d4ed8; }

.actions-row button.secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.actions-row button.secondary:hover { background: #f3f4f6; }

/* Upsell */
.upsell {
  margin-top: 16px;
  padding: 12px;
  background: #fffbeb;
  border-radius: 6px;
  font-size: 13px;
  color: #92400e;
  text-align: center;
}

/* Endpoint */
.endpoint-box {
  margin-top: 16px;
  padding: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.endpoint-box h3 { font-size: 14px; margin-bottom: 8px; }

.endpoint-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.endpoint-url-row code {
  flex: 1;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  word-break: break-all;
}

.small { padding: 6px 12px; font-size: 12px; }

.endpoint-label { font-size: 12px; color: #6b7280; margin: 8px 0 4px; }
.endpoint-usage { font-size: 13px; color: #374151; margin-bottom: 4px; }
.endpoint-usage code { background: #f3f4f6; padding: 2px 6px; border-radius: 3px; font-size: 12px; }

.endpoint-note {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
}

/* Demo page */
.demo-badge {
  font-size: 0.4em;
  background: #e0e7ff;
  color: #3730a3;
  padding: 2px 10px;
  border-radius: 10px;
  vertical-align: middle;
}

.demo-try { margin-bottom: 8px; }

.demo-desc {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
}

.try-row {
  display: flex;
  gap: 8px;
}

.try-row input {
  flex: 1;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
}

.try-row input:focus { border-color: #2563eb; }

.try-row button {
  padding: 10px 18px;
  font-size: 14px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.try-row button:hover { background: #1d4ed8; }

#single-result {
  margin-top: 8px;
  font-size: 14px;
  min-height: 22px;
}

.preview-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.demo-cta {
  text-align: center;
  font-size: 15px;
  padding: 12px 0;
}

.demo-cta a { color: #2563eb; }

/* Footer */
.footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
}

.footer a { color: #6b7280; }

@media (max-width: 520px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .try-row { flex-direction: column; }
  .try-row button { width: 100%; }
}
