/* =========================================================
   Gearly — Matched Gearbox Stylesheet
   ========================================================= */

/* Base Global Resets */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  line-height: 1.5;
  color: var(--text, #111827);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Hero Section */
.finder-hero {
  padding: 70px 0 65px;
  text-align: center;
}

.finder-hero .container {
  max-width: 900px;
}

.finder-hero .back-link {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--muted, #6b7280);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.finder-hero .back-link:hover {
  color: var(--text, #111827);
}

.finder-hero .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--accent-soft, #fff1eb);
  color: var(--accent-dark, #e85a25);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.finder-hero h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -4px;
}

.finder-hero h1 span {
  display: block;
  color: var(--accent, #ff6b35);
}

.finder-hero .hero-text {
  max-width: 620px;
  margin: 25px auto 0;
  color: var(--muted, #6b7280);
  font-size: 16px;
  line-height: 1.7;
}

/* Unchanged Search Box Container */
.finder-hero .search-box {
  display: flex;
  align-items: center;
  max-width: 680px;
  margin: 28px auto 0;
  padding: 8px;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.finder-hero .search-box:focus-within {
  border-color: var(--accent, #ff6b35);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.finder-hero .search-box input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text, #111827);
  font-size: 16px;
  line-height: 48px;
}

.finder-hero .search-box input::placeholder {
  color: var(--muted, #9ca3af);
}

.finder-hero .search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 11px;
  background: var(--accent, #ff6b35);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.finder-hero .search-box button:hover {
  transform: translateY(-2px);
  background: var(--accent-dark, #e85a25);
}

.finder-hero .search-note {
  margin: 12px auto 0;
  color: var(--muted, #6b7280);
  font-size: 12px;
  line-height: 1.4;
}

/* Search Results Layout */
.search-results {
  max-width: 900px;
  margin: 25px auto 0;
  text-align: start;
}

.result-list {
  display: grid;
  gap: 12px;
}

.result-item {
  width: 100%;
  padding: 20px;
  text-align: start;
  background: #fafafa;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  color: var(--text, #111827);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.result-item:hover {
  transform: translateY(-3px);
  background: #ffffff;
  border-color: var(--accent, #ff6b35);
  box-shadow: 0 12px 25px rgba(17, 24, 39, 0.06);
}

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.result-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
}

.result-item .meta {
  display: block;
  color: var(--muted, #6b7280);
  font-size: 12px;
  line-height: 1.5;
}

.verified-pill,
.source-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft, #fff1eb);
  color: var(--accent-dark, #e85a25);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.no-results {
  padding: 24px;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 18px;
  color: var(--muted, #6b7280);
  text-align: center;
  line-height: 1.6;
}

/* Gearbox Detail Page */
.gearbox-page {
  padding: 45px;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 24px;
}

.back-button {
  display: inline-block;
  padding: 0;
  margin-bottom: 22px;
  border: 0;
  background: transparent;
  color: var(--muted, #6b7280);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--text, #111827);
}

.gearbox-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

.gearbox-title h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1;
  letter-spacing: -2px;
}

.gearbox-title p {
  margin: 0;
  color: var(--muted, #6b7280);
  font-size: 14px;
  line-height: 1.7;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.info-box {
  padding: 15px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 13px;
  background: #fafafa;
}

.info-box small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted, #6b7280);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
}

.info-box strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text, #111827);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.detail {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line, #e5e7eb);
  background: #fafafa;
}

.detail h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  color: var(--text, #111827);
}

.detail p {
  margin: 0;
  color: var(--muted, #6b7280);
  font-size: 13px;
  line-height: 1.6;
}

.detail ul {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--muted, #6b7280);
  font-size: 13px;
  line-height: 1.7;
}

.detail li + li {
  margin-top: 6px;
}

/* Ratio Table */
.ratio-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
}

.ratio-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card, #ffffff);
}

.ratio-table th,
.ratio-table td {
  padding: 14px 18px;
  text-align: start;
  border-bottom: 1px solid var(--line, #e5e7eb);
  font-size: 13px;
  line-height: 1.4;
}

.ratio-table th {
  background: #fafafa;
  color: var(--muted, #6b7280);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
}

.ratio-table tr:last-child td {
  border-bottom: 0;
}

/* Source Box & Notices */
.source-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px;
  margin-top: 20px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  background: #fafafa;
}

.source-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text, #111827);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}

.source-box span {
  display: block;
  color: var(--muted, #6b7280);
  font-size: 12px;
  line-height: 1.5;
}

.source-link {
  flex: 0 0 auto;
  color: var(--accent-dark, #e85a25);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
}

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

.warning {
  margin-top: 25px;
  padding: 18px;
  border-left: 3px solid var(--accent, #ff6b35);
  border-radius: 12px;
  background: var(--accent-soft, #fff1eb);
  color: #6b4a3d;
  font-size: 12px;
  line-height: 1.6;
}

.warning strong {
  font-size: 13px;
  color: var(--text, #111827);
  margin-inline-end: 4px;
}

/* Popular Grid */
.popular-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.popular-button {
  padding: 13px 18px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 13px;
  background: #fafafa;
  color: var(--text, #111827);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.popular-button:hover {
  background: var(--accent-soft, #fff1eb);
  border-color: var(--accent, #ff6b35);
  transform: translateX(3px);
}

/* Footer Banner */
.source-banner {
  padding: 45px;
  border-radius: 24px;
  background: #111827;
  color: #ffffff;
}

.source-banner .source-label {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--accent, #ff6b35);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}

.source-banner h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.1;
  letter-spacing: -1px;
}

.source-banner p {
  max-width: 680px;
  margin: 0;
  color: #b8c0cc;
  line-height: 1.7;
  font-size: 14px;
}

/* Responsive Media Queries */
@media (max-width: 950px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .finder-hero {
    padding: 50px 0;
  }

  .finder-hero h1 {
    letter-spacing: -3px;
  }

  .gearbox-page {
    padding: 27px 18px;
    border-radius: 18px;
  }

  .gearbox-title,
  .result-top,
  .source-box {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .popular-button:hover {
    transform: none;
  }
}

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

  .finder-hero .search-box {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }

  .finder-hero .search-box button {
    width: 100%;
  }
}