/* Key · BPM finder — minimal, focused */

.find-body {
  background: #000;
  min-height: 100vh;
  min-height: 100svh;
}

.find-body::before {
  opacity: 0.18;
}

.find-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-5) var(--space-6);
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 255, 255, 0.035) 0%, transparent 55%),
    var(--ink);
}

.find-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(640px, 100%);
  margin: 0 auto 36px;
  gap: 12px;
  min-width: 0;
}

.find-nav .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.find-nav .logo-word {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  opacity: 0.92;
}

.find-nav .nav-links a {
  color: #9a9a9a;
}

.find-nav .nav-links a[aria-current="page"] {
  color: #f4f4f4;
  background: rgba(255, 255, 255, 0.06);
}

.find-main {
  width: min(640px, 100%);
  margin: 0 auto;
  display: grid;
  gap: var(--space-4);
  flex: 1;
  align-content: start;
  padding-top: clamp(0px, 4vh, 48px);
}

.find-head {
  text-align: center;
  margin-bottom: var(--space-2);
}

.find-head h1 {
  margin: 0 0 10px;
  font-family: var(--font-brand);
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-display);
  color: var(--brand);
  line-height: var(--leading-tight);
}

.find-head p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-md);
  color: var(--silkscreen);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
}

.find-drop {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 132px;
  padding: 28px 20px;
  border: 1px solid var(--panel-edge-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.find-alive {
  display: none;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 0;
  margin: 0 auto 10px;
  overflow: visible;
  color: var(--teal, #6ec4b4);
}

.find-drop.is-busy .find-alive {
  display: grid;
}

.find-drop.is-busy .find-alive.logo-hero--cycle,
.find-drop.is-busy .find-alive.logo-hero {
  --mark-w: min(168px, 62vw);
  color: var(--teal, #6ec4b4);
}

.find-drop.is-busy {
  border-style: solid;
  border-color: var(--teal-soft, rgba(110, 196, 180, 0.32));
  background: var(--teal-wash, rgba(110, 196, 180, 0.1));
  pointer-events: none;
  cursor: default;
  /* Allow hue-rotated chain to paint; clip was unnecessary */
  overflow: visible;
}

.find-drop:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: rgba(255, 255, 255, 0.35);
}

.find-identity {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.find-identity[hidden] {
  display: none !important;
}

.find-identity input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f4f4f4;
  font: inherit;
  font-size: var(--text-base);
}

.find-identity input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
}

.find-identity .btn-primary {
  padding: 12px 18px;
  white-space: nowrap;
}

.find-drop.is-busy .find-drop-title {
  animation: find-pulse 1.5s ease-in-out infinite;
}

.find-drop.is-busy .find-drop-sub {
  opacity: 0.55;
}

.find-body.is-finding .find-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 30% at 50% 35%, rgba(110, 196, 180, 0.05), transparent 70%);
  opacity: 0.7;
}

@keyframes find-pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes find-glow {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.find-results-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
  text-align: center;
}

.find-results-head .find-source {
  margin: 0;
  flex: none;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.find-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f2;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.find-play:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
}

.find-play.is-playing {
  background: rgba(255, 255, 255, 0.14);
}

.find-play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 1px;
}

.find-play.is-playing .find-play-icon {
  width: 9px;
  height: 9px;
  margin-left: 0;
  border: none;
  background:
    linear-gradient(currentColor, currentColor) left / 2.5px 100% no-repeat,
    linear-gradient(currentColor, currentColor) right / 2.5px 100% no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  .find-drop.is-busy .find-drop-title,
  .find-body.is-finding .find-page::after {
    animation: none !important;
  }
}

.find-drop:hover,
.find-drop.is-drag {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.find-drop-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: #f0f0f0;
  letter-spacing: -0.02em;
}

.find-drop-sub {
  font-size: 0.88rem;
  color: #7a7a7a;
}

.find-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.find-link input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f4f4f4;
  font: inherit;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
}

.find-link input::placeholder {
  color: #666;
}

.find-link input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
}

.find-link .btn-primary {
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  background: #f4f4f4;
  color: #0a0a0a;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.find-link .btn-primary:disabled {
  opacity: 0.5;
  cursor: wait;
}

.find-status {
  margin: 0;
  text-align: center;
  font-size: var(--text-base);
  color: #9a9a9a;
}

.find-status.is-error {
  color: var(--danger-soft);
}

.find-results {
  margin-top: 12px;
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: find-in 0.28s ease-out both;
}

.find-source {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #8a8a8a;
  letter-spacing: -0.01em;
}

.find-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.find-metric {
  text-align: center;
  display: grid;
  gap: 6px;
}

.find-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: #6e6e6e;
}

.find-value {
  font-family: var(--font-ui);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.03em;
  color: #f6f6f6;
  line-height: 1.15;
}

.find-meta {
  font-size: var(--text-xs);
  color: #7a7a7a;
  min-height: 1.2em;
}

.find-note {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: #6e6e6e;
  line-height: 1.45;
}

.find-chain-cta {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 0.88rem;
  color: #9a9a9a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.find-chain-cta:hover {
  color: #f4f4f4;
}

.find-seo {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 14px;
}

.find-seo h2 {
  margin: 8px 0 0;
  font-family: var(--font-brand);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #e8e8e8;
}

.find-seo p,
.find-seo li {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #8a8a8a;
}

.find-seo strong {
  color: #cfcfcf;
  font-weight: 600;
}

.find-seo a {
  color: #cfcfcf;
}

.find-seo-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 6px;
}

.find-faq {
  display: grid;
  gap: 8px;
}

.find-faq details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px;
}

.find-faq summary {
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  color: #e4e4e4;
  letter-spacing: -0.01em;
  list-style: none;
}

.find-faq summary::-webkit-details-marker {
  display: none;
}

.find-faq details[open] summary {
  margin-bottom: 8px;
}

.find-faq p {
  font-size: var(--text-sm);
}

@media (max-width: 640px) {
  .find-seo {
    margin-top: 36px;
    padding-top: 22px;
  }
}

@keyframes find-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .find-page {
    padding:
      calc(14px + env(safe-area-inset-top, 0px))
      max(16px, env(safe-area-inset-right, 0px))
      calc(36px + env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-left, 0px));
  }

  .find-nav {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
  }

  .find-nav .logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  .find-nav .logo-word {
    font-size: var(--text-base);
  }

  .find-nav .nav-links {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px;
  }

  .find-nav .nav-links a,
  .find-nav .account-menu-trigger,
  .find-nav .nav-cta {
    font-size: var(--text-xs) !important;
    padding: 7px 10px !important;
    min-height: 36px;
  }

  .find-main {
    padding-top: 2vh;
    gap: 14px;
  }

  .find-head h1 {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .find-head p {
    font-size: var(--text-md);
    max-width: 20rem;
    margin-inline: auto;
  }

  .find-drop {
    min-height: 120px;
    padding: 24px 16px;
  }

  .find-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .find-link {
    grid-template-columns: 1fr;
  }

  .find-identity {
    grid-template-columns: 1fr;
  }

  .find-identity .btn-primary {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .find-link input {
    font-size: 16px;
    min-height: 48px;
  }

  .find-link .btn-primary {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .find-results {
    padding: 22px 16px 20px;
  }

  .find-results-head {
    gap: 12px;
    margin-bottom: 18px;
  }

  .find-play {
    min-height: 44px;
    width: min(100%, 14rem);
  }

  .find-value {
    font-size: clamp(1.45rem, 6vw, 1.75rem);
  }

  .find-drop.is-busy .find-alive.logo-hero--cycle,
  .find-drop.is-busy .find-alive.logo-hero {
    --mark-w: 120px;
  }
}

@media (max-width: 380px) {
  .find-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .find-nav .logo-word {
    font-size: var(--text-base);
  }
}

@media (prefers-reduced-motion: reduce) {
  .find-results {
    animation: none;
  }
}
