/* style.css - Moneymakuh Directory Engine (Mobile-First Modern CSS) */

:root {
  --primary: #5b3fe6;
  --primary-hover: #4a2fd0;
  --primary-light: #efebff;
  --link: #4b2fcb;
  --link-hover: #3f1f9e;
  --accent: #3f1f9e;
  --accent-hover: #2e1577;
  --accent-light: #efebff;
  --accent-badge: #5b3fe6;
  --accent-text: #3f1f9e;

  --bg: #f7f6fd;
  --surface: #ffffff;
  --surface-subtle: #f0eefa;
  --text: #1f2430;
  --text-soft: #3a3f54;
  --text-muted: #575c73;
  --text-faint: #8a8fa6;
  --border: #e3e0f2;
  --border-strong: #c9c4e6;
  --border-focus: #6d4af0;

  --success: #166534;
  --success-bg: #dcfce7;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;

  --info-bg: #f3f0ff;
  --info-border: #d8d0fa;
  --info-text: #3f1f9e;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;
  --warn-text-strong: #78350f;
  --warn-chip-bg: #fef3c7;
  --warn-chip-border: #f59e0b;
  --ok-bg: #f0fdf4;
  --ok-border: #bbf7d0;
  --ok-strong: #10b981;
  --ok-text: #166534;
  --ok-text-strong: #14532d;

  --badge-primary-bg: #e9e4ff;
  --badge-primary-fg: #3f1f9e;
  --badge-mfg-bg: #e4e7ff;
  --badge-mfg-fg: #2f2a8a;
  --badge-type-bg: #fef08a;
  --badge-type-fg: #854d0e;
  --badge-accent-bg: #e0d9ff;
  --badge-accent-fg: #2e1577;

  --hero-grad: radial-gradient(60% 90% at 85% 0%, rgba(139,116,255,.45) 0%, rgba(139,116,255,0) 60%), linear-gradient(135deg, #2a1470 0%, #3f1f9e 48%, #5b3fe6 100%);
  --hero-sub: #e9e5ff;
  --cta-grad: linear-gradient(135deg, #1f2430 0%, #3f1f9e 100%);
  --cta-sub: #d9d3f5;
  --footer-bg: #171a24;
  --footer-border: #2a2e40;
  --footer-text: #b9bdd3;
  --footer-head: #ffffff;
  --header-bg: rgba(255,255,255,.88);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px 0 rgb(31 36 48 / 0.06);
  --shadow-md: 0 6px 16px -4px rgb(63 31 158 / 0.14), 0 2px 6px -2px rgb(31 36 48 / 0.06);
  --shadow-lg: 0 18px 36px -10px rgb(63 31 158 / 0.28), 0 6px 12px -6px rgb(31 36 48 / 0.10);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --max-w: 1200px;
  color-scheme: light;
}

/* Dark theme: chosen by the toggle (data-theme) or, with no saved choice and no JS, by the system setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #6d4af0;
  --primary-hover: #7d5ef5;
  --primary-light: #2a2160;
  --link: #a99bff;
  --link-hover: #c3b9ff;
  --accent: #5b3fe6;
  --accent-hover: #6d4af0;
  --accent-light: #2a2160;
  --accent-badge: #8b74ff;
  --accent-text: #c3b9ff;

  --bg: #0f111a;
  --surface: #171a26;
  --surface-subtle: #1e2232;
  --text: #eceaf8;
  --text-soft: #c8cbdd;
  --text-muted: #a3a8bf;
  --text-faint: #7d829b;
  --border: #2c3047;
  --border-strong: #3d4263;
  --border-focus: #a99bff;

  --success: #4ade80;
  --success-bg: #12281c;
  --warning: #fcd34d;
  --warning-bg: #3a2a08;
  --danger: #fca5a5;
  --danger-bg: #3b1518;

  --info-bg: #1c1840;
  --info-border: #3a3175;
  --info-text: #d9d2ff;
  --warn-bg: #2a2008;
  --warn-border: #5c4710;
  --warn-text: #fcd34d;
  --warn-text-strong: #fde68a;
  --warn-chip-bg: #3a2a08;
  --warn-chip-border: #b45309;
  --ok-bg: #12281c;
  --ok-border: #1f5a37;
  --ok-strong: #34d399;
  --ok-text: #86efac;
  --ok-text-strong: #bbf7d0;

  --badge-primary-bg: #2e2570;
  --badge-primary-fg: #d9d2ff;
  --badge-mfg-bg: #262a66;
  --badge-mfg-fg: #cfd3ff;
  --badge-type-bg: #3f3508;
  --badge-type-fg: #fde68a;
  --badge-accent-bg: #34277f;
  --badge-accent-fg: #e4defe;

  --hero-grad: radial-gradient(60% 90% at 85% 0%, rgba(109,74,240,.40) 0%, rgba(109,74,240,0) 60%), linear-gradient(135deg, #1a1040 0%, #2a1a6b 55%, #3f1f9e 100%);
  --hero-sub: #e0dafc;
  --cta-grad: linear-gradient(135deg, #1e2232 0%, #34277f 100%);
  --cta-sub: #d0cbef;
  --footer-bg: #0b0d14;
  --footer-border: #232739;
  --footer-text: #b4b8ce;
  --header-bg: rgba(23,26,38,.88);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 6px 16px -4px rgb(0 0 0 / 0.5), 0 2px 6px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 18px 36px -10px rgb(0 0 0 / 0.65), 0 6px 12px -6px rgb(0 0 0 / 0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --primary: #6d4af0;
    --primary-hover: #7d5ef5;
    --primary-light: #2a2160;
    --link: #a99bff;
    --link-hover: #c3b9ff;
    --accent: #5b3fe6;
    --accent-hover: #6d4af0;
    --accent-light: #2a2160;
    --accent-badge: #8b74ff;
  --accent-text: #c3b9ff;

    --bg: #0f111a;
    --surface: #171a26;
    --surface-subtle: #1e2232;
    --text: #eceaf8;
    --text-soft: #c8cbdd;
    --text-muted: #a3a8bf;
    --text-faint: #7d829b;
    --border: #2c3047;
    --border-strong: #3d4263;
    --border-focus: #a99bff;

    --success: #4ade80;
    --success-bg: #12281c;
    --warning: #fcd34d;
    --warning-bg: #3a2a08;
    --danger: #fca5a5;
    --danger-bg: #3b1518;

    --info-bg: #1c1840;
    --info-border: #3a3175;
    --info-text: #d9d2ff;
    --warn-bg: #2a2008;
    --warn-border: #5c4710;
    --warn-text: #fcd34d;
    --warn-text-strong: #fde68a;
    --warn-chip-bg: #3a2a08;
    --warn-chip-border: #b45309;
    --ok-bg: #12281c;
    --ok-border: #1f5a37;
    --ok-strong: #34d399;
    --ok-text: #86efac;
    --ok-text-strong: #bbf7d0;

    --badge-primary-bg: #2e2570;
    --badge-primary-fg: #d9d2ff;
    --badge-mfg-bg: #262a66;
    --badge-mfg-fg: #cfd3ff;
    --badge-type-bg: #3f3508;
    --badge-type-fg: #fde68a;
    --badge-accent-bg: #34277f;
    --badge-accent-fg: #e4defe;

    --hero-grad: radial-gradient(60% 90% at 85% 0%, rgba(109,74,240,.40) 0%, rgba(109,74,240,0) 60%), linear-gradient(135deg, #1a1040 0%, #2a1a6b 55%, #3f1f9e 100%);
    --hero-sub: #e0dafc;
    --cta-grad: linear-gradient(135deg, #1e2232 0%, #34277f 100%);
    --cta-sub: #d0cbef;
    --footer-bg: #0b0d14;
    --footer-border: #232739;
    --footer-text: #b4b8ce;
    --header-bg: rgba(23,26,38,.88);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 6px 16px -4px rgb(0 0 0 / 0.5), 0 2px 6px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 18px 36px -10px rgb(0 0 0 / 0.65), 0 6px 12px -6px rgb(0 0 0 / 0.5);
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.modal-active {
  overflow: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--surface-subtle);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container-prose {
  max-width: 800px;
}

/* Skip link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  border-radius: 0 0 4px 0;
}
.skip-to-content:focus {
  top: 0;
}

/* Header */
.site-header {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none !important;
}

.brand-icon {
  font-size: 1.6rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Nav */
.site-nav {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.35rem;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--link);
  background: var(--primary-light);
  text-decoration: none;
}

.mobile-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s ease;
}

@media (min-width: 1200px) {
  .site-nav {
    display: block;
  }
  .mobile-nav-toggle {
    display: none;
  }
}

@media (max-width: 1199px) {
  .site-nav.nav-open {
    display: block;
    position: absolute;
    top: 4.25rem;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
  }
  .site-nav.nav-open .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
}

/* Hero Section */
.hero-section {
  background: var(--hero-grad);
  color: #ffffff;
  padding: 3.5rem 0 4rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 1rem 0;
  font-weight: 800;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 2.85rem;
  }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--hero-sub);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-search-form {
  background: var(--surface);
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
}

.search-input-wrapper:focus-within {
  border-color: var(--border-focus);
  background: var(--surface);
}

.search-icon {
  font-size: 1.2rem;
  opacity: 0.6;
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  padding: 0.4rem 0;
}

.search-quick-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}

.quick-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tag-pill {
  font-size: 0.8rem;
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  transition: all 0.15s ease;
}

.tag-pill:hover {
  background: var(--primary-light);
  color: var(--link);
  text-decoration: none;
  border-color: var(--primary);
}

.tag-pill.highlight {
  background: var(--warn-chip-bg);
  border-color: var(--warn-chip-border);
  color: var(--warn-text);
}

/* Metrics Section */
.metrics-section {
  margin-top: -2rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 10;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.metric-card.highlight {
  border-color: var(--ok-strong);
  background: linear-gradient(to bottom, var(--surface), var(--ok-bg));
}

.metric-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--link);
  line-height: 1.1;
}

.metric-card.highlight .metric-num {
  color: var(--ok-text);
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.25rem;
}

.metric-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* General Sections */
.section {
  padding: 2.5rem 0;
}

.bg-subtle {
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .section-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.section-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* Grids & Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.device-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.device-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.card-title a {
  color: var(--text);
}

.card-title a:hover {
  color: var(--link);
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.25rem;
}

.spec-k {
  color: var(--text-muted);
}

.card-footer-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.parts-count-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-text);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none !important;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.category-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.category-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.category-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.category-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--link);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}

.badge-primary { background: var(--badge-primary-bg); color: var(--badge-primary-fg); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-mfg { background: var(--badge-mfg-bg); color: var(--badge-mfg-fg); }
.badge-type { background: var(--badge-type-bg); color: var(--badge-type-fg); }
.badge-outline { background: var(--surface-subtle); color: var(--text-soft); border: 1px solid var(--border); }
.badge-sponsored { background: var(--warn-chip-bg); color: var(--warn-text); border: 1px solid var(--warn-border); }
.badge-accent { background: var(--badge-accent-bg); color: var(--badge-accent-fg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.925rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-sm {
  font-size: 0.825rem;
  padding: 0.35rem 0.75rem;
}

.btn-xs {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
}

.btn-lg {
  font-size: 1.05rem;
  padding: 0.75rem 1.5rem;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--link);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}
.btn-text:hover {
  text-decoration: underline;
}

/* Breadcrumbs */
.breadcrumb-nav {
  margin-bottom: 1rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  gap: 0.4rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--text-faint);
}

.breadcrumbs a {
  color: var(--text-muted);
}
.breadcrumbs a:hover {
  color: var(--link);
}

/* Detail Pages */
.detail-header-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.detail-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.detail-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.detail-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.detail-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 860px) {
  .detail-layout {
    grid-template-columns: 2fr 1fr;
  }
}

.section-subhead {
  margin-bottom: 1.25rem;
}

.section-subhead h2 {
  font-size: 1.45rem;
  font-weight: 700;
}

.section-subhead p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Part Item Card */
.parts-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.part-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.part-item-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 600px) {
  .part-item-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.part-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.35rem 0;
}

.part-number-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.part-number-tag code {
  font-size: 0.95em;
  font-weight: 700;
  color: var(--text);
}

.part-item-desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.fit-notes-box {
  background: var(--surface-subtle);
  border-left: 3px solid var(--primary);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.meta-pill {
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.part-source-citation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.verified-tag {
  color: var(--success);
  font-weight: 600;
  margin-left: auto;
}

/* Specs Table */
.specs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.specs-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.specs-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  width: 45%;
}

.specs-table td {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  word-break: break-word;
}

.specs-table tr.highlight-row td {
  color: var(--success);
}

.source-audit-box {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-size: 0.8rem;
}

.source-audit-title {
  font-weight: 700;
  color: var(--ok-text);
  margin-bottom: 0.25rem;
}

.source-audit-desc {
  color: var(--ok-text-strong);
  margin-bottom: 0.4rem;
}

.source-audit-link {
  display: block;
  font-weight: 600;
  color: var(--link);
  word-break: break-all;
}

.audit-date {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Monetization: Affiliate Hook */
.monetization-affiliate-card {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.affiliate-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-affiliate {
  background: #c2410c; /* contrast fix for white text (was #ea580c, 3.55:1) */
  color: #fff;
  font-size: 1rem;
  padding: 0.65rem 1.25rem;
}

.btn-affiliate:hover {
  background: #c2410c;
}

.affiliate-micro-disclosure {
  margin-top: 0.5rem;
  color: var(--warn-text-strong);
  font-size: 0.75rem;
  line-height: 1.4;
}

.disclosure-link {
  color: var(--warn-text-strong);
  text-decoration: underline;
  font-weight: 600;
}

/* Inline Quote Card */
.inline-quote-section {
  padding: 2.5rem 0;
}

.quote-cta-card {
  background: var(--cta-grad);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .quote-cta-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem;
  }
}

.quote-cta-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0.5rem 0 0.35rem;
}

.quote-cta-desc {
  color: var(--cta-sub);
  font-size: 0.95rem;
  max-width: 600px;
}

/* Search Directory Page Layout */
.search-header-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.page-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.search-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .search-layout {
    grid-template-columns: 280px 1fr;
  }
}

.filters-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 5.5rem;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.filters-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.filter-group input, .filter-group select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
}

.filter-group input:focus, .filter-group select:focus {
  border-color: var(--primary);
}

.results-top-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.active-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary-light);
  color: var(--link);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.active-tag-pill button {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--link);
  line-height: 1;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.result-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.4rem 0 0.25rem;
  line-height: 1.3;
}

.result-part-number {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.pn-code {
  font-weight: 700;
  color: var(--link);
}

.result-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.compatible-models-preview {
  background: var(--surface-subtle);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.comp-list-inline {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.comp-list-inline li::after {
  content: "•";
  margin-left: 0.35rem;
  color: var(--text-faint);
}

.comp-list-inline li:last-child::after {
  content: "";
}

.no-results-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
}

.no-results-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.no-results-card p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Compare Tool */
.compare-selectors-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .compare-selectors-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

.selector-col label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.model-compare-select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}

.compare-table-responsive {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.compare-table th, .compare-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.875rem;
}

.compare-table th {
  background: var(--surface-subtle);
  font-weight: 700;
}

.feature-col {
  width: 25%;
  background: var(--surface-subtle);
}

.model-col {
  width: 25%;
}

.compare-model-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.25rem 0 0.5rem;
}

.section-row td {
  background: var(--surface-subtle);
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.6rem 1rem;
}

.part-pill {
  margin-bottom: 0.25rem;
}

.part-pill a {
  font-weight: 600;
}

.compare-footnote {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal Dialog */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  padding: 1rem;
  align-items: center;
  justify-content: center;
}

.modal-overlay.modal-visible {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

.lead-prototype-banner {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--info-text);
  margin-bottom: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 540px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-group.full-width {
    grid-column: span 2;
  }
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input, .form-group select, .form-group textarea {
  background: var(--surface);
  color: var(--text);
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.form-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.privacy-reassurance {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Prose & Legal Pages */
.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.prose-card h2 {
  font-size: 1.45rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: 700;
}

.prose-card h2:first-child {
  margin-top: 0;
}

.prose-card h3 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.4rem;
  font-weight: 600;
}

.prose-card p, .prose-card ul, .prose-card ol {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.prose-card ul, .prose-card ol {
  padding-left: 1.5rem;
}

.contact-box {
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.contact-k {
  font-weight: 700;
  font-size: 0.85rem;
}

/* Thin content gap notice */
.gap-notice-card {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
}

.gap-icon {
  font-size: 1.75rem;
}

.gap-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--warn-text);
  margin-bottom: 0.35rem;
}

.gap-content p {
  font-size: 0.875rem;
  color: var(--warn-text-strong);
  margin-bottom: 0.75rem;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin: 1rem 0;
}

.alert-info { background: var(--info-bg); border: 1px solid var(--info-border); color: var(--info-text); }
.alert-warning { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.alert-success { background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); }

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
  border-top: 1px solid var(--footer-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.audit-badge {
  display: inline-block;
  background: #065f46;
  color: #a7f3d0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.25rem;
}

.footer-heading {
  color: #fff;
  font-size: 0.925rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--footer-text);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 1.5rem;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.disclaimer-mini {
  color: var(--footer-text);
  line-height: 1.4;
}

/* Accessibility: links inside running text must not rely on color alone */
.prose-card p a, .prose-card li a, .prose-card td a { text-decoration: underline; }

/* ===== Brand, theme toggle, polish (purple restyle) ===== */
.brand-logo { display: block; height: 2.35rem; width: auto; }
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand-logo-light { display: none; }
  :root:not([data-theme]) .brand-logo-dark { display: block; }
}
.footer-logo { display: block; height: 2.1rem; width: auto; }
.site-brand { flex-shrink: 0; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
@media (min-width: 1200px) {
  .site-nav { order: 2; margin-left: 1rem; }
  .header-actions { order: 3; margin-left: 0.75rem; }
}

.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { background: var(--primary-light); color: var(--link); border-color: var(--border-strong); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
}

:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
::selection { background: var(--primary); color: #fff; }

.btn-primary { box-shadow: 0 1px 2px rgb(63 31 158 / .25); }
.btn-primary:hover { box-shadow: 0 4px 12px -2px rgb(91 63 230 / .45); }
.btn-outline { background: var(--surface); }
.nav-link.active { font-weight: 600; }

/* Callout boxes (formerly inline styles) */
.alert-compact { margin: 0.5rem 0; padding: 0.5rem 0.75rem; font-size: 0.85rem; border-left: 3px solid var(--primary); }
.alert-info { border-left: 3px solid var(--primary); }
.callout { border-left: 4px solid var(--primary); background: var(--surface); padding: 1.25rem 1.5rem; border-radius: var(--radius-md); }
.callout-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.callout-title { margin: 0 0 0.25rem; font-size: 1.1rem; color: var(--text); }
.callout-text { margin: 0; color: var(--text-soft); font-size: 0.95rem; }
.callout-list { margin: 0; padding-left: 1.25rem; color: var(--text-soft); line-height: 1.6; }
.callout-list li { margin-bottom: 0.5rem; }
.callout > .callout-title { margin-top: 0; margin-bottom: 0.75rem; }
.model-note { font-size: 0.85rem; color: var(--text-muted); margin: 0.75rem 0 1rem; line-height: 1.4; }
.alert-info.callout { color: var(--text-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Mobile fix: search box no longer overflows its card on narrow screens */
.search-input-wrapper input { min-width: 0; }
.search-input-wrapper .btn { flex-shrink: 0; white-space: nowrap; }

/* Trust grid (home): previously unstyled */
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 2.5rem 0; }
@media (min-width: 760px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm); }
.trust-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--primary-light); font-size: 1.2rem; margin-bottom: 0.6rem; }
.trust-item h4 { font-size: 1rem; margin-bottom: 0.3rem; color: var(--text); }
.trust-item p { font-size: 0.9rem; color: var(--text-soft); line-height: 1.5; }

/* Links inside running text are underlined (not distinguished by colour alone: WCAG 1.4.1) */
main :is(p, li, td, dd, .alert, .compat-source-cite, .contact-v, .source-cite) a:not(.btn):not(.nav-link) { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* ===== Search landing page ('/') ===== */
.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; }
body.page-landing { background: radial-gradient(70% 55% at 50% 0%, rgba(109,74,240,.16) 0%, rgba(109,74,240,0) 70%), var(--bg); }
.landing { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 1.25rem 1.25rem 1.25rem; position: relative; }
.landing-toggle { position: absolute; top: 1rem; right: 1rem; }
.landing-main { flex: 1; width: 100%; max-width: 42rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: 6vh; }
.landing-logo { margin: 0; line-height: 0; }
.landing-logo-img { height: 4.4rem; width: auto; max-width: 100%; }
.landing-logo .brand-logo-dark { display: none; }
:root[data-theme="dark"] .landing-logo .brand-logo-light { display: none; }
:root[data-theme="dark"] .landing-logo .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .landing-logo .brand-logo-light { display: none; }
  :root:not([data-theme]) .landing-logo .brand-logo-dark { display: block; }
}
.landing-tagline { margin: 1.1rem 0 1.75rem; font-size: 1.1rem; color: var(--text-muted); }
.landing-search { width: 100%; }
.landing-box { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; padding: .45rem .5rem .45rem 1rem; box-shadow: var(--shadow-md); transition: box-shadow .2s ease, border-color .2s ease; }
.landing-box:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 4px rgba(109,74,240,.22), var(--shadow-lg); }
.landing-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 1.15rem; padding: .7rem .2rem; font-family: inherit; }
.landing-box input::placeholder { color: var(--text-muted); opacity: 1; }
.landing-box input::-webkit-search-cancel-button { display: none; }
.landing-box .btn { border-radius: 999px; padding: .75rem 1.5rem; font-size: 1rem; flex-shrink: 0; }
.landing-browse { margin-top: 2rem; padding: .75rem 1.5rem; font-size: 1rem; border-radius: 999px; }
.landing-foot { font-size: .8rem; color: var(--text-muted); display: flex; gap: .6rem; align-items: center; padding-top: 1rem; }
.landing-foot a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.landing-foot a:hover { color: var(--link); }
/* Animated finder identity (from the search preview), CSS only */
.lpf-orb { position: relative; width: 30px; height: 30px; flex: 0 0 30px; }
.lpf-orb i { position: absolute; display: block; }
.lpf-orb .core { inset: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, #c4b5fd 35%, #6d4af0 100%); box-shadow: 0 0 10px rgba(139,116,255,.8); animation: lpf-pulse 2.6s ease-in-out infinite; }
.lpf-orb .ring { inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: #8b74ff; border-right-color: rgba(139,116,255,.4); animation: lpf-spin 3.2s linear infinite; }
.lpf-orb .ring.r2 { inset: 3px; border-top-color: #b3a4ff; border-left-color: rgba(109,74,240,.4); animation-duration: 2.1s; animation-direction: reverse; }
.landing-box:focus-within .lpf-orb .ring { animation-duration: 1s; }
.landing-box:focus-within .lpf-orb .ring.r2 { animation-duration: .7s; }
@keyframes lpf-spin { to { transform: rotate(360deg); } }
@keyframes lpf-pulse { 0%, 100% { transform: scale(.9); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lpf-orb .core, .lpf-orb .ring { animation: none !important; } }
@media (max-width: 520px) {
  .landing-logo-img { height: 3.2rem; }
  .landing-box { padding-left: .75rem; }
  .landing-box .btn { padding: .7rem 1.1rem; }
  .landing-box input { font-size: .95rem; }
  .landing-tagline { font-size: 1rem; }
}

.nav-link { white-space: nowrap; }
.nav-list { gap: 0.15rem; }
@media (min-width: 1200px) and (max-width: 1320px) { .nav-link { padding: 0.4rem 0.45rem; font-size: 0.88rem; } }

/* AG-023: agent/developer callouts (theme-aware via --link) */
.landing-agent-note, .hero-agent-note { font-size: .88rem; color: var(--text-muted); line-height: 1.4; }
.landing-agent-note { margin: .95rem 0 0; }
.hero-agent-note { margin: .65rem 0 .85rem; text-align: center; }
.landing-agent-note a, .hero-agent-note a { color: var(--link); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.landing-agent-note a:hover, .hero-agent-note a:hover { color: var(--primary-hover); }

/* Landing corner chips (AI agents + About), bottom-right, theme-aware, clearly visible */
.landing-chips { width: 100%; max-width: 70rem; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; padding: .5rem .25rem 0; }
.chip { display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; font-weight: 600; line-height: 1.2; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--link); background: var(--surface); color: var(--link); text-decoration: none; box-shadow: var(--shadow-md); transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.chip:hover { background: var(--link); color: var(--surface); box-shadow: var(--shadow-lg); }
.chip:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
@media (max-width: 640px) { .landing-chips { justify-content: center; } .chip { font-size: .88rem; } }
.about-contact { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-subtle); border: 1px dashed var(--border-strong); border-radius: 6px; padding: .1rem .4rem; }

/* ---- Declutter (part + model detail pages): compact cards, chips, short source links, collapsible notes ---- */
.detail-main-col { min-width: 0; }
.detail-main-col, .specs-card { overflow-wrap: anywhere; }
@media (min-width: 860px) {
  .detail-sidebar { position: sticky; top: 5.5rem; align-self: start; }
}

.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.3em;
  font-size: 0.75rem; line-height: 1.2; padding: 0.2em 0.65em;
  background: var(--surface-subtle); color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 999px;
}
.chip code { font-size: 0.95em; font-weight: 700; color: var(--text); background: none; padding: 0; }

/* Note shown once above a list when every item shares it */
.compat-shared {
  background: var(--primary-light); border: 1px solid var(--border-strong);
  border-left: 4px solid var(--primary); border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem; margin-bottom: 1.25rem; font-size: 0.9rem; color: var(--text-soft);
}
.compat-shared p { margin: 0; }
.compat-shared-note strong { color: var(--text); }
.compat-shared-meta { margin-top: 0.6rem !important; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.compat-shared .chip { background: var(--surface); }

/* Compatible-model cards (part pages) */
.compatible-models-grid { display: flex; flex-direction: column; gap: 1rem; }
.model-compat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.7rem;
}
.model-compat-card:hover { border-color: var(--border-strong); }
.compat-header { display: flex; flex-direction: column; gap: 0.7rem; }
@media (min-width: 600px) {
  .compat-header { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 1rem; }
  .compat-header > .btn { flex: none; }
}
.compat-title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.compat-model-title { font-size: 1.1rem; font-weight: 700; margin: 0; line-height: 1.3; }
.compat-notes-box, .fit-notes-box { font-size: 0.875rem; color: var(--text-soft); }
.compat-notes-box { background: var(--surface-subtle); border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 0.6rem 0.9rem; }
.compat-notes-box p { margin: 0.15rem 0 0; }

/* Short labelled source links */
.source-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.source-chips-label { font-weight: 600; margin-right: 0.1rem; }
.source-chip {
  display: inline-flex; align-items: center; gap: 0.3em; font-size: 0.78rem; font-weight: 600; line-height: 1.2;
  padding: 0.25em 0.7em; color: var(--link); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 999px; text-decoration: none;
}
.source-chip:hover { background: var(--primary-light); color: var(--link-hover); }
.source-chips-block { margin-bottom: 0.4rem; }
.source-host { font-size: 0.72rem; color: var(--text-muted); }

/* Collapsible long cross-check text */
.source-notes { font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 0.5rem; }
.source-notes summary { cursor: pointer; font-weight: 600; color: var(--text-soft); width: fit-content; }
.source-notes summary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
.source-notes p { margin: 0.5rem 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.source-audit-box .source-notes { border-top: 0; padding-top: 0.25rem; }
.source-audit-box .source-notes summary { color: var(--ok-text); }

/* Model pages: part cards use the same pieces */
.part-item-card { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.1rem 1.25rem; }
.part-item-card .part-item-header { margin-bottom: 0; }
.part-item-title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.part-item-card .part-item-title { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.part-item-card .part-item-desc { margin: 0; }
.part-item-card .fit-notes-box { margin-bottom: 0; }
.part-item-card .fit-notes-box p { margin: 0.15rem 0 0; }
.verified-line { margin: 0; font-size: 0.75rem; color: var(--success); font-weight: 600; }
a.chip-link { color: var(--link); font-weight: 600; text-decoration: none; border-color: var(--border-strong); background: var(--surface); }
a.chip-link:hover { background: var(--primary-light); color: var(--link-hover); }
