:root {
  --bg: #0c0f14;
  --bg-card: #141922;
  --bg-elevated: #1a2030;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --teal: #72c8c6;
  --success: #22c55e;
  --error: #ef4444;
  --wip: #e8c547;
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

.page {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.header {
  margin-bottom: 1.5rem;
}

.logo-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 0;
  background: none;
  border: none;
}

.logo-frame:first-child {
  justify-content: flex-start;
}

.logo-frame:last-child {
  justify-content: flex-end;
}

.logo-img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.logo-bridge {
  text-align: center;
  padding: 0 0.25rem;
}

.bridge-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.logo-bridge h1 {
  margin: 0.1rem 0 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.tagline {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.wip-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.95rem;
  background: rgba(232, 197, 71, 0.1);
  border: 1px solid rgba(232, 197, 71, 0.35);
  border-radius: 10px;
}

.wip-badge {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--wip);
  color: #1a1403;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wip-banner p {
  margin: 0;
  color: #f3e3a6;
  font-size: 0.88rem;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.card h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lead strong {
  color: var(--text);
  font-weight: 500;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg-elevated);
  margin-bottom: 1.25rem;
}

.dropzone:hover,
.dropzone:focus,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
  outline: none;
}

.dropzone-icon svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.dropzone-title {
  margin: 0;
  font-weight: 500;
}

.dropzone-hint {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dropzone-file {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  padding: 0;
}

.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

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

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.alert {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
  margin: 0;
}

.stats-grid dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-grid dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.steps li {
  margin-bottom: 0.5rem;
}

.steps code,
.note code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--text);
}

.note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer {
  margin-top: 2.5rem;
  text-align: center;
}

.footer-brand {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.footer-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

.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;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid #9ee8e6;
  border-radius: 50%;
  background: var(--teal);
  color: var(--teal);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(114, 200, 198, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.info-fab svg {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto;
}

.info-fab:hover,
.info-fab:focus {
  transform: scale(1.06);
  filter: brightness(1.08);
  outline: none;
  box-shadow: 0 0 0 4px rgba(114, 200, 198, 0.28);
}

@media (max-width: 720px) {
  .logo-bar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .logo-frame,
  .logo-frame:first-child,
  .logo-frame:last-child {
    width: 100%;
    justify-content: center;
  }

  .logo-img {
    height: 48px;
  }
}

@media (max-width: 480px) {
  .wip-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(6px);
}

.modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  padding: 1.5rem 1.6rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.modal h2 {
  margin: 0 2rem 1rem 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--text);
  background: var(--bg-elevated);
  outline: none;
}

.info-points {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.info-points li {
  margin-bottom: 0.85rem;
}

.info-points li:last-child {
  margin-bottom: 0;
}

.info-points strong {
  color: var(--text);
  font-weight: 600;
}
