/* About-page certificates: complete scans, scoped styling and a native dialog. */
.company-certificates { scroll-margin-top: 152px; }
.company-cert-container { max-width: 1200px; margin: 0 auto; }
.company-certificates [hidden], .company-cert-dialog [hidden] { display: none !important; }
.company-certificates .section-head { margin-bottom: 34px; }
.company-cert-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.company-cert-filter { appearance: none; border: 1px solid #d8dce3; background: #fff; color: #454a55; border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; min-height: 44px; }
.company-cert-filter span { margin-left: 5px; opacity: .75; font-variant-numeric: tabular-nums; }
.company-cert-filter:hover { border-color: var(--brand-blue, #0066cc); color: var(--brand-blue, #0066cc); }
.company-cert-filter[aria-pressed="true"] { background: var(--brand-blue, #0066cc); border-color: var(--brand-blue, #0066cc); color: #fff; }
.company-cert-result { margin: 24px 0 16px; color: #687080; font-size: 13px; line-height: 1.6; }
.company-cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 24px; }
.company-cert-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e1e4e9; border-radius: 18px; overflow: hidden; background: #fff; }
.company-cert-preview { display: flex; position: relative; box-sizing: border-box; height: 300px; min-height: 0; max-height: 300px; flex: 0 0 300px; align-items: center; justify-content: center; padding: 20px; background: #f0f2f5; border-bottom: 1px solid #e6e9ee; cursor: zoom-in; }
.company-cert-preview img { display: block; width: 100%; height: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.company-cert-pages { position: absolute; right: 12px; bottom: 12px; padding: 4px 9px; font-size: 12px; line-height: 1.5; color: #3c4757; background: #fff; border: 1px solid #dfe4eb; border-radius: 6px; }
.company-cert-body { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; padding: 22px; }
.company-cert-kicker { display: flex; width: 100%; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 11px; color: #687080; font-size: 12px; line-height: 1.5; }
.company-cert-badge { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #eaf2fc; color: #175696; font-weight: 600; }
.company-cert-card h3 { font-size: 19px; line-height: 1.5; font-weight: 600; color: var(--apple-black, #1d1d1f); margin: 0 0 8px; overflow-wrap: anywhere; }
.company-cert-summary { font-size: 14px; line-height: 1.75; color: #454a55; margin: 0 0 18px; }
.company-cert-metadata { display: grid; gap: 9px; width: 100%; margin: 0 0 16px; font-size: 12px; line-height: 1.65; }
.company-cert-metadata div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; min-width: 0; }
.company-cert-metadata dt { color: #737b88; }
.company-cert-metadata dd { margin: 0; color: #343b46; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.company-cert-note { width: 100%; margin: 0 0 18px; border-left: 2px solid #cadbef; padding-left: 10px; color: #5c6572; font-size: 12px; line-height: 1.7; }
.company-cert-view { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: auto; color: var(--brand-blue, #0066cc); font-size: 14px; font-weight: 600; }
.company-cert-view:hover, .company-cert-original:hover { text-decoration: underline; text-underline-offset: 4px; }
.company-cert-fallback-pages { width: 100%; margin-top: 8px; font-size: 13px; line-height: 1.7; }
.company-cert-fallback-pages summary { cursor: pointer; }
.company-cert-fallback-pages ul { padding: 8px 0 0 18px; }
.company-cert-fallback-pages a { display: inline-block; padding: 5px 0; color: var(--brand-blue, #0066cc); }
.company-certificates.is-enhanced .company-cert-fallback-pages { display: none; }
.company-certificates a:focus-visible, .company-certificates button:focus-visible, .company-cert-dialog a:focus-visible, .company-cert-dialog button:focus-visible { outline: 3px solid #1777d2; outline-offset: 4px; }
.company-cert-preview:focus-visible { outline-offset: -5px; }
body.company-certificate-open { overflow: hidden; }
.company-cert-dialog { position: fixed; inset: 0; width: min(1120px, calc(100vw - 48px)); max-width: none; height: calc(100vh - 48px); height: calc(100dvh - 48px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); padding: 0; margin: auto; border: 0; border-radius: 18px; background: #fff; color: #1d1d1f; box-shadow: 0 24px 100px #0005; overflow-y: auto; overscroll-behavior: contain; }
.company-cert-dialog[open] { display: grid; grid-template-rows: auto minmax(100px, 1fr) auto auto; }
.company-cert-dialog::backdrop { background: rgb(16 24 38 / 78%); }
.company-cert-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 22px 24px 18px; }
.company-cert-dialog-header > div { min-width: 0; }
.company-cert-dialog-eyebrow { color: var(--brand-blue, #0066cc); font-size: 12px; line-height: 1.5; margin: 0 0 4px; }
.company-cert-dialog-header h2 { margin: 0; font-size: 21px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.company-cert-dialog-header p:last-child { margin: 5px 0 0; color: #616b79; font-size: 13px; line-height: 1.6; }
.company-cert-close { flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #dde2e8; background: #f6f7f9; color: #344052; border-radius: 50%; cursor: pointer; font: inherit; font-size: 28px; line-height: 1; }
.company-cert-close:hover { background: #e9edf2; }
.company-cert-dialog-stage { display: flex; min-height: 0; min-width: 0; align-items: center; justify-content: center; padding: 18px 24px; background: #eef0f3; overflow: hidden; scroll-behavior: auto; overflow-anchor: none; }
.company-cert-dialog-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.company-cert-dialog-stage.is-zoomed { display: block; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; cursor: grab; }
.company-cert-dialog-stage.is-zoomed .company-cert-dialog-image { width: var(--certificate-reading-width, 100%); max-width: none; height: auto; max-height: none; margin: 0 auto; user-select: none; -webkit-user-drag: none; }
.company-cert-dialog-stage.is-dragging { cursor: grabbing; }
.company-cert-dialog-stage:focus-visible { outline: 3px solid #1777d2; outline-offset: -4px; }
.company-cert-dialog-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 14px 24px; }
.company-cert-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; min-width: 0; }
.company-cert-pagination button { padding: 10px 12px; min-height: 44px; white-space: nowrap; border: 1px solid #d8dfe7; background: #fff; border-radius: 8px; color: #334154; font: inherit; font-size: 13px; line-height: 1.5; cursor: pointer; }
.company-cert-pagination button:hover:enabled { color: var(--brand-blue, #0066cc); border-color: var(--brand-blue, #0066cc); }
.company-cert-pagination button:disabled { opacity: .38; cursor: default; }
.company-cert-page-status { min-width: 86px; margin: 0; color: #586272; text-align: center; font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.company-cert-original { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-size: 14px; color: var(--brand-blue, #0066cc); font-weight: 600; }
.company-cert-view-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.company-cert-zoom { min-height: 44px; padding: 10px 14px; border: 1px solid #c8d8ea; border-radius: 8px; background: #f2f7fd; color: #175696; font: inherit; font-size: 13px; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.company-cert-zoom:hover { border-color: var(--brand-blue, #0066cc); }
.company-cert-zoom[aria-pressed="true"] { background: #e5effb; }
.company-cert-reading-hint { flex-basis: 100%; margin: -4px 0 0; color: #637080; font-size: 12px; line-height: 1.6; }
.company-cert-dialog-note { padding: 0 24px 18px; margin: 0; color: #637080; font-size: 12px; line-height: 1.6; }
.company-cert-dialog-note:empty { display: none; }
@media (max-width: 980px) {
  .company-cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .company-certificates { padding: 64px 20px; scroll-margin-top: 140px; }
  .company-certificates .section-head { margin-bottom: 26px; }
  .company-cert-filters { justify-content: flex-start; gap: 8px; }
  .company-cert-filter { padding: 10px 12px; font-size: 13px; }
  .company-cert-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .company-cert-preview { padding: 18px; }
  .company-cert-body { padding: 20px; }
  .company-cert-dialog { width: calc(100vw - 20px); height: calc(100vh - 20px); height: calc(100dvh - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 14px; }
  .company-cert-dialog-header { gap: 12px; padding: 16px; }
  .company-cert-dialog-header h2 { font-size: 17px; }
  .company-cert-dialog-header p:last-child { font-size: 12px; }
  .company-cert-dialog-stage { padding: 12px; }
  .company-cert-dialog-footer { flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 14px; }
  .company-cert-pagination { justify-content: space-between; gap: 8px; }
  .company-cert-pagination button { padding: 9px; font-size: 12px; }
  .company-cert-page-status { flex: 1; min-width: 0; }
  .company-cert-original { align-self: center; }
  .company-cert-view-actions { justify-content: center; gap: 14px; }
  .company-cert-reading-hint { flex-basis: auto; margin: 5px 0 0; text-align: center; }
  .company-cert-dialog-note { padding: 0 16px 16px; }
}
