@import url("./brand-tokens.css");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
}

/* BRAND_LOCK_START: Keep this section identical across all NeoNema properties. */
.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--header-bg) 84%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  display: block;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand img.brand-main {
  height: 50px;
}

.brand img.brand-sub {
  height: 36px;
  opacity: 0.9;
}

.brand-parent {
  display: flex;
  align-items: center;
}

.brand-attribution {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1;
}

.divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 4px 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-attribution {
    font-size: 0.75rem;
    gap: 6px;
  }

  .brand img.brand-main {
    height: 40px;
  }

  .brand img.brand-sub {
    height: 28px;
  }

  .divider {
    height: 38px;
  }
}
/* BRAND_LOCK_END */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-content {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero {
  max-width: none;
  width: 100%;
  text-align: center;
  margin-bottom: 0;
}

.hero p {
  margin: 0;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 2px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  line-height: 1.1;
}

.hero-copy {
  color: var(--muted);
  line-height: 1.4;
  margin: 4px 0 0;
  font-size: 0.92rem;
}

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

.tool-card {
  margin-top: 8px;
  max-width: none;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 16px 18px 18px;
}

.tool-card > .tool-switcher,
.tool-card > .tool-caption {
  text-align: center;
}

.primary-label {
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

.tool-description {
  margin-top: 6px;
  color: var(--muted);
}

.tool-switcher {
  margin-top: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-tab {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
}

.tool-tab.active {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border-color: var(--primary);
}

.tool-caption {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 60%, var(--background));
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.tool-options {
  margin-top: 10px;
}

.tool-options label {
  margin-top: 0;
}

.field-hint {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

.field-hint strong {
  font-weight: 600;
  color: var(--foreground);
}

.segment-fieldset {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 60%, var(--background));
}

.segment-legend {
  padding: 0 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segment-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 8px;
}

.segment-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
  cursor: pointer;
  color: var(--foreground);
}

.segment-label input {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
}

.jsonpath-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.converter-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--card) 60%, var(--background));
}

.converter-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: end;
}

.converter-field label {
  margin: 0 0 6px;
}

.converter-field select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #121a16;
  color: var(--foreground);
  padding: 10px 12px;
}

.converter-swap-btn {
  padding: 10px 12px;
  min-width: 76px;
}

.examples-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}

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

  .converter-swap-btn {
    width: 100%;
  }
}

.compare-panel {
  margin-top: 8px;
}

.compare-panel .input-header {
  margin-top: 12px;
}

.compare-input {
  min-height: 120px;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 600;
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 6px;
}

.input-header label {
  margin: 0;
}

.sample-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.link-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.link-btn:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

#source-input.drag-over {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, #101713);
}

.json-stats {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.json-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  background: color-mix(in srgb, var(--card) 60%, var(--background));
}

.json-stats .stat-label {
  color: var(--muted);
}

.json-stats .stat-value {
  font-weight: 700;
  color: var(--foreground);
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101713;
  color: var(--foreground);
  padding: 12px;
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

#result-output {
  min-height: 120px;
}

.actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#run-btn {
  background: var(--primary);
  color: #062012;
}

.ghost-btn {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.ghost-btn:hover {
  border-color: var(--primary);
}

.status {
  min-height: 20px;
  color: var(--primary);
  margin-bottom: 0;
}

.privacy-note {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.privacy-bold {
  display: block;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 6px;
}

.hero-copy .privacy-bold {
  display: inline;
  margin-bottom: 0;
  color: var(--foreground);
}

.ad-box {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 24px;
}

.ad-box-label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.ad-box-slot {
  width: 100%;
  min-height: 120px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 40%, var(--background));
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 16px 28px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--foreground);
}

@media (max-width: 768px) {
}
