/* SanSong Patent & University-Industry R&D Showcase Styles (scripts/robixx/patents.css).
   100% pure Onmark + Robixx template color tokens (#ffffff, #f8f8f8, #ececec, #eeeeee, #dadada, #bbbbbb, #8d8d8d, #6b5f5f, #373737, #222222, #1a1a1a, #000000, #ac1717).
   Strictly scoped under `.om-patents-*` so zero native Robixx or Onmark classes are altered. */

/* ---------- 1. Hero & Verified Corporate IP Counter Plinth ---------- */

.om-patents-hero {
  position: relative;
  padding: clamp(128px, 14vw, 172px) 0 clamp(56px, 6vw, 84px);
  background-color: #f8f8f8;
  border-bottom: 1px solid #dadada;
  color: #000000;
}

.om-patents-breadcrumb {
  margin-bottom: 24px;
}

.om-patents-breadcrumb ol {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 10px;
  min-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b5f5f;
}

.om-patents-breadcrumb li:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.om-patents-breadcrumb li + li::before {
  content: '/';
  margin-right: 10px;
  color: #8d8d8d;
}

.om-patents-breadcrumb a {
  color: #373737;
  text-decoration: none;
}

.om-patents-breadcrumb a:hover,
.om-patents-breadcrumb a:focus-visible {
  color: #ac1717;
  text-decoration: underline;
}

.om-patents-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.85fr);
  gap: 36px 56px;
  align-items: end;
}

.om-patents-h1 {
  margin: 0 0 20px;
  color: #000000;
  font-family: var(--_typography---fonts--primary-headings, Switzer, Arial, sans-serif);
  font-size: clamp(36px, 4.2vw, 62px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.om-patents-lead {
  margin: 0 0 28px;
  max-width: 64ch;
  color: #373737;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.65;
}

.om-patents-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.om-patents-outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 13px 24px;
  border-radius: 100px;
  border: 1px solid #1a1a1a;
  background-color: #ffffff;
  color: #000000;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.om-patents-outline-link:hover,
.om-patents-outline-link:focus-visible {
  background-color: #1a1a1a;
  border-color: #1a1a1a;
  color: #ffffff;
}

.om-patents-outline-link:focus-visible {
  outline: 2px solid #ac1717;
  outline-offset: 3px;
}

.om-patents-dossier-card {
  padding: 28px 30px;
  border-radius: 20px;
  background-color: #ffffff;
  border: 1px solid #dadada;
  border-top: 4px solid #ac1717;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.05);
}

.om-patents-dossier-kicker {
  display: block;
  margin-bottom: 10px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ac1717;
}

.om-patents-dossier-title {
  margin: 0 0 12px;
  color: #000000;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.om-patents-dossier-note {
  margin: 0;
  color: #6b5f5f;
  font-size: 14px;
  line-height: 1.62;
}

.om-patents-counter-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(36px, 4.5vw, 56px);
  border-radius: 20px;
  overflow: hidden;
  background-color: #373737;
  border: 1px solid #1a1a1a;
}

.om-patents-counter-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 28px;
  background-color: #1a1a1a;
  color: #ffffff;
}

.om-patents-counter-val {
  font-family: var(--_typography---fonts--primary-headings, Switzer, Arial, sans-serif);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.om-patents-counter-val--code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding-top: 6px;
}

.om-patents-counter-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ececec;
}

.om-patents-counter-sub {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #bbbbbb;
}

/* ---------- 2. Representative CNIPA Certificate Gallery ---------- */

.om-patents-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

.om-cert-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid #dadada;
  background-color: #ffffff;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.om-cert-card:hover {
  transform: translateY(-3px);
  border-color: #1a1a1a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.om-cert-zoom-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #eeeeee;
  background-color: #1a1a1a;
  cursor: zoom-in;
  text-align: left;
  overflow: hidden;
}

.om-cert-zoom-btn:focus-visible {
  outline: 3px solid #ac1717;
  outline-offset: -3px;
}

.om-cert-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.om-cert-zoom-btn:hover .om-cert-img,
.om-cert-zoom-btn:focus-visible .om-cert-img {
  transform: scale(1.025);
}

.om-cert-zoom-pill {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  background-color: rgba(26, 26, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.om-cert-zoom-btn:hover .om-cert-zoom-pill,
.om-cert-zoom-btn:focus-visible .om-cert-zoom-pill {
  background-color: #ac1717;
  border-color: #ac1717;
}

.om-cert-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
  flex: 1;
}

.om-cert-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.om-cert-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 100px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: #f8f8f8;
  border: 1px solid #dadada;
  color: #222222;
}

.om-cert-badge--invention {
  background-color: #ac1717;
  border-color: #ac1717;
  color: #ffffff;
}

.om-cert-badge--joint {
  background-color: #1a1a1a;
  border-color: #1a1a1a;
  color: #ffffff;
}

.om-cert-zl {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  color: #6b5f5f;
  font-variant-numeric: tabular-nums;
}

.om-cert-title {
  margin: 0;
  color: #000000;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.om-cert-subtitle {
  margin: 0;
  color: #373737;
  font-size: 14px;
  line-height: 1.45;
}

.om-cert-caption {
  margin: 4px 0 0;
  color: #6b5f5f;
  font-size: 14px;
  line-height: 1.58;
}

.om-cert-meta-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed #dadada;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #6b5f5f;
}

/* ---------- 3. Accessible Native <dialog> Certificate Lightbox ---------- */

.om-patents-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid #373737;
  border-radius: 20px;
  background-color: #1a1a1a;
  color: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.om-patents-dialog:not([open]) {
  display: none;
}

.om-patents-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.82);
}

.om-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 28px);
}

.om-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background-color: #000000;
  border-bottom: 1px solid #373737;
}

.om-dialog-title-wrap {
  min-width: 0;
}

.om-dialog-kicker {
  display: block;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  color: #bbbbbb;
  letter-spacing: 0.05em;
}

.om-dialog-title {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.om-dialog-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.om-dialog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid #373737;
  background-color: #222222;
  color: #ffffff;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.om-dialog-btn:hover,
.om-dialog-btn:focus-visible {
  background-color: #ac1717;
  border-color: #ac1717;
  color: #ffffff;
}

.om-dialog-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.om-dialog-stage {
  padding: 16px 22px;
  background-color: #1a1a1a;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.om-dialog-img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid #373737;
}

.om-dialog-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  background-color: #000000;
  border-top: 1px solid #373737;
  font-size: 13px;
  color: #ececec;
}

/* ---------- 4. Interactive Registry Search & Table Badges ---------- */

.om-patents-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.om-patents-toolbar .om-selector-tabs {
  margin-bottom: 0;
}

.om-patents-search-wrap {
  position: relative;
  min-width: min(320px, 100%);
}

.om-patents-search {
  width: 100%;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid #dadada;
  background-color: #ffffff;
  color: #000000;
  font-size: 14px;
  line-height: 1.3;
}

.om-patents-search::placeholder {
  color: #8d8d8d;
}

.om-patents-search:focus-visible {
  outline: 2px solid #ac1717;
  outline-offset: 2px;
  border-color: #000000;
}

.om-reg-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #dadada;
  background-color: #f8f8f8;
  color: #222222;
}

.om-reg-pill--invention {
  background-color: rgba(172, 23, 23, 0.1);
  border-color: #ac1717;
  color: #ac1717;
}

.om-reg-pill--joint {
  background-color: #1a1a1a;
  border-color: #1a1a1a;
  color: #ffffff;
}

.om-reg-zl {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: #000000;
}

.om-reg-sub {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: #6b5f5f;
}

.om-reg-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  padding: 4px 11px;
  border-radius: 100px;
  border: 1px solid #1a1a1a;
  background-color: #ffffff;
  color: #000000;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.om-reg-view-btn:hover,
.om-reg-view-btn:focus-visible {
  background-color: #ac1717;
  border-color: #ac1717;
  color: #ffffff;
}

/* ---------- 5. Patent FAQ & Spliced Highlight Band (/about & /) ---------- */

.om-patents-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.om-patents-faq-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid #dadada;
  background-color: #ffffff;
}

.om-patents-faq-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.38;
  color: #000000;
}

.om-patents-faq-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #373737;
}

.om-patents-highlight-foot {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed #dadada;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.om-patents-highlight-note {
  margin: 0;
  max-width: 66ch;
  font-size: 14px;
  line-height: 1.6;
  color: #6b5f5f;
}

.om-patents-stat-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  background-color: rgba(172, 23, 23, 0.08);
  border: 1px solid rgba(172, 23, 23, 0.28);
  color: #ac1717;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

html[lang^='zh'] :is(
  .om-patents-h1,
  .om-cert-title,
  .om-dialog-title,
  .om-patents-dossier-title,
  .om-patents-faq-card h3
) {
  font-family: var(--sansong-zh-font, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif);
  letter-spacing: 0;
}

html[lang^='zh'] :is(
  .om-patents-breadcrumb ol,
  .om-patents-dossier-kicker,
  .om-patents-counter-label,
  .om-cert-badge,
  .om-reg-pill,
  .om-patents-stat-tag
) {
  font-family: var(--sansong-zh-font, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif);
  text-transform: none;
  letter-spacing: 0.03em;
}

/* ---------- 6. Responsive Layout & Mobile Card-Stack Table ---------- */

@media (max-width: 991px) {
  .om-patents-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .om-patents-counter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .om-patents-faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .om-patents-gallery-grid,
  .om-patents-counter-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .om-dialog-header,
  .om-dialog-footer {
    padding: 12px 16px;
  }

  .om-dialog-stage {
    padding: 12px;
  }
}
