/* CaseMate Research — Apple HIG Mobile UI (360px–768px) */
:root {
  --cm-surface: #ffffff;
  --cm-bg: #f8fafc;
  --cm-border: rgba(15, 23, 42, 0.08);
  --cm-text: #0f172a;
  --cm-muted: #64748b;
  --cm-accent: #b45309;
  --cm-radius: 16px;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }
  header, .top-nav, nav {
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
  }
  /* Touch-friendly 44px minimum tap targets */
  button, a.btn, input[type="search"], input[type="text"], select {
    min-height: 44px;
    font-size: 16px !important; /* prevents iOS Safari auto-zoom on focus */
    border-radius: 12px;
  }
  /* Readable judgment & result cards on mobile */
  .judgment-body, article, .case-text, #judgment-content {
    font-size: 16px !important;
    line-height: 1.72 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Responsive grid collapse */
  .grid, .two-col, .layout-split {
    grid-template-columns: 1fr !important;
  }
  /* Crawlable Court Hub mobile strip */
  .cm-seo-hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

.cm-seo-hub {
  max-width: 1120px;
  margin: 40px auto 24px;
  padding: 24px 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.cm-seo-hub h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.cm-seo-hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.cm-seo-hub-pills a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.cm-seo-hub-pills a:hover {
  border-color: #b45309;
  color: #b45309;
}
.cm-seo-recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.cm-seo-recent-list li {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.65);
}
.cm-seo-recent-list a {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  display: block;
}
.cm-seo-recent-list a:hover {
  color: #b45309;
}
