/* VETOBEN Certificate of Authenticity v3 — authentication laboratory design */
.vb-auth-cert-page,
.vb-auth-cert-modal {
  --ink: #1a1714;
  --ink-70: rgba(26, 23, 20, 0.72);
  --ink-45: rgba(26, 23, 20, 0.46);
  --gold-deep: #b08d4f;
  --gold-light: #d8bd85;
  --paper: #fcfaf3;
  --line: rgba(26, 23, 20, 0.14);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.vb-auth-cert-page {
  background: #dcd6c8;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 26px 20px 64px;
}

.vb-auth-cert-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px 48px;
  overflow: auto;
  background: rgba(26, 23, 20, 0.68);
}

.vb-auth-cert-modal *,
.vb-auth-cert-page * {
  box-sizing: border-box;
}

.vb-auth-cert-modal.is-open {
  display: flex;
}

.vb-auth-cert-modal__shell {
  width: min(900px, 100%);
  position: relative;
  margin: 0 auto;
}

.vb-auth-cert-modal__close {
  position: sticky;
  top: 8px;
  float: right;
  z-index: 20;
  width: 40px;
  height: 40px;
  margin: 0 0 10px;
  border: 0;
  border-radius: 999px;
  background: #1a1714;
  color: #f5f1e8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.vb-auth-cert-modal__actions,
.vb-auth-cert-page__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  clear: both;
  margin-top: 14px;
}

.vb-auth-cert-modal__actions button,
.vb-auth-cert-page__actions a,
.vb-auth-cert-page__actions button {
  border: 0;
  padding: 10px 16px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.vb-auth-cert-btn-print {
  background: #1a1714;
  color: #f5f1e8;
}

.vb-auth-cert-btn-close {
  background: #efe8da;
  color: #1a1714;
}

.vb-auth-cert-v3 {
  width: 900px;
  min-height: 1273px;
  clear: both;
  position: relative;
  overflow: hidden;
  padding: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 32px 76px rgba(0, 0, 0, 0.32);
}

.vb-auth-cert-v3 .guilloche {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 50% 38%, rgba(176, 141, 79, 0.05) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(115deg, rgba(176, 141, 79, 0.04) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(65deg, rgba(176, 141, 79, 0.04) 0 1px, transparent 1px 13px);
}

.vb-auth-cert-v3 .edge {
  min-height: 1245px;
  border: 2px solid var(--gold-deep);
  padding: 3px;
}

.vb-auth-cert-v3 .inner {
  min-height: 1237px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(176, 141, 79, 0.65);
  padding: 26px 34px 16px;
}

.vb-auth-cert-v3 .corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 0 solid var(--gold-deep);
  opacity: 0.75;
}

.vb-auth-cert-v3 .corner.tl {
  top: -1px;
  left: -1px;
  border-top-width: 2px;
  border-left-width: 2px;
}

.vb-auth-cert-v3 .corner.tr {
  top: -1px;
  right: -1px;
  border-top-width: 2px;
  border-right-width: 2px;
}

.vb-auth-cert-v3 .corner.bl {
  bottom: -1px;
  left: -1px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.vb-auth-cert-v3 .corner.br {
  right: -1px;
  bottom: -1px;
  border-right-width: 2px;
  border-bottom-width: 2px;
}

.vb-auth-cert-v3 .hd {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.vb-auth-cert-v3 .hd__lock {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vb-auth-cert-v3 .hd__lock img {
  width: auto;
  height: 34px;
}

.vb-auth-cert-v3 .hd__name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.42em;
}

.vb-auth-cert-v3 .hd__sub {
  margin-top: 5px;
  color: var(--ink-45);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .hd__meta {
  border-collapse: collapse;
  font-size: 8.4px;
}

.vb-auth-cert-v3 .hd__meta th {
  padding: 1.5px 10px 1.5px 0;
  color: var(--ink-45);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.vb-auth-cert-v3 .hd__meta td {
  color: var(--ink-70);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.vb-auth-cert-v3 .title {
  position: relative;
  z-index: 2;
  margin: 16px 0 14px;
  text-align: center;
}

.vb-auth-cert-v3 .title h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 37px;
  font-weight: 600;
  letter-spacing: 0.012em;
}

.vb-auth-cert-v3 .title p {
  margin: 7px 0 0;
  color: var(--gold-deep);
  font-size: 8.6px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto 12px;
}

.vb-auth-cert-v3 .rule i {
  flex: 1;
  height: 1px;
  background: var(--gold-deep);
  opacity: 0.55;
}

.vb-auth-cert-v3 .rule b {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--gold-deep);
}

.vb-auth-cert-v3 .body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
}

.vb-auth-cert-v3 .photo {
  margin: 0;
}

.vb-auth-cert-v3 .photo img,
.vb-auth-cert-v3 .photo-placeholder {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  border: 1px solid rgba(26, 23, 20, 0.18);
  padding: 6px;
  background: #fff;
}

.vb-auth-cert-v3 .photo-placeholder {
  color: var(--ink-45);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
}

.vb-auth-cert-v3 .photo figcaption {
  margin-top: 7px;
  color: var(--ink-45);
  font-size: 7.6px;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .verdict {
  margin-top: 14px;
  border: 1.4px solid var(--gold-deep);
  padding: 11px 12px;
  background: rgba(216, 189, 133, 0.09);
  text-align: center;
}

.vb-auth-cert-v3 .verdict__k,
.vb-auth-cert-v3 .verify__k {
  color: var(--gold-deep);
  font-size: 7.8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .verdict__v {
  margin: 3px 0 2px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 31px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.vb-auth-cert-v3 .verdict__n,
.vb-auth-cert-v3 .gnote,
.vb-auth-cert-v3 .masknote {
  color: var(--ink-45);
  font-size: 7.8px;
  line-height: 1.5;
}

.vb-auth-cert-v3 .sec {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  color: var(--gold-deep);
  font-size: 8.4px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .sec span {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.vb-auth-cert-v3 .sec::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(176, 141, 79, 0.4);
}

.vb-auth-cert-v3 .spec,
.vb-auth-cert-v3 .owner {
  width: 100%;
  border-collapse: collapse;
}

.vb-auth-cert-v3 .spec tr,
.vb-auth-cert-v3 .owner tr {
  border-bottom: 1px solid rgba(26, 23, 20, 0.09);
}

.vb-auth-cert-v3 .spec tr:first-child,
.vb-auth-cert-v3 .owner tr:first-child {
  border-top: 1px solid rgba(26, 23, 20, 0.09);
}

.vb-auth-cert-v3 .spec th,
.vb-auth-cert-v3 .owner th {
  width: 37%;
  padding: 5.2px 0;
  color: var(--ink-45);
  font-size: 7.9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-align: left;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .spec td,
.vb-auth-cert-v3 .owner td {
  padding: 5.2px 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
}

.vb-auth-cert-v3 .mono {
  font-family: "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.02em;
}

.vb-auth-cert-v3 .masknote {
  margin: 8px 0 0;
  font-style: italic;
}

.vb-auth-cert-v3 .checks {
  position: relative;
  z-index: 2;
  margin: 0 0 16px;
  padding: 0;
  columns: 2;
  column-gap: 26px;
  list-style: none;
}

.vb-auth-cert-v3 .checks li {
  position: relative;
  break-inside: avoid;
  margin-bottom: 3px;
  padding-left: 14px;
  color: var(--ink-70);
  font-size: 9.1px;
  line-height: 1.55;
}

.vb-auth-cert-v3 .checks li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--gold-deep);
  font-size: 9px;
  font-weight: 700;
}

.vb-auth-cert-v3 .two {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 26px;
  margin-bottom: 14px;
}

.vb-auth-cert-v3 .grades {
  display: flex;
  gap: 6px;
}

.vb-auth-cert-v3 .grades .g {
  flex: 1;
  border: 1px solid rgba(26, 23, 20, 0.14);
  padding: 6px 2px;
  color: var(--ink-45);
  font-size: 7.8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .grades .g.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.vb-auth-cert-v3 .gnote {
  margin: 7px 0 0;
}

.vb-auth-cert-v3 .value {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
}

.vb-auth-cert-v3 .declaration {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin: 4px auto 16px;
  color: var(--ink-70);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 11.6px;
  font-style: italic;
  line-height: 1.72;
  text-align: center;
}

.vb-auth-cert-v3 .declaration b {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
}

.vb-auth-cert-v3 .owner {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}

.vb-auth-cert-v3 .owner th {
  width: 14%;
}

.vb-auth-cert-v3 .owner td {
  width: 36%;
  padding-right: 16px;
}

.vb-auth-cert-v3 .limits {
  position: relative;
  z-index: 2;
  margin: 0 0 auto;
  padding-left: 15px;
  columns: 2;
  column-gap: 26px;
}

.vb-auth-cert-v3 .limits li {
  break-inside: avoid;
  margin-bottom: 6px;
  padding-left: 2px;
  color: var(--ink-45);
  font-size: 7.8px;
  line-height: 1.6;
}

.vb-auth-cert-v3 .sign {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 104px 1fr;
  align-items: end;
  gap: 20px;
  margin-top: 16px;
}

.vb-auth-cert-v3 .sig {
  margin-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 7px;
  font-family: "Pinyon Script", cursive;
  font-size: 33px;
  line-height: 1;
}

.vb-auth-cert-v3 .sign__name {
  font-size: 9.4px;
  font-weight: 700;
}

.vb-auth-cert-v3 .sign__role {
  margin-top: 2px;
  color: var(--ink-45);
  font-size: 7.7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .seal-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  justify-self: center;
}

.vb-auth-cert-v3 .seal-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(2px 6px 8px rgba(20, 10, 5, 0.4)) drop-shadow(0 2px 3px rgba(20, 10, 5, 0.28));
}

.vb-auth-cert-v3 .seal-wrap img.mono {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 21px;
  transform: translate(-50%, -64%);
}

.vb-auth-cert-v3 .verify {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  text-align: right;
}

.vb-auth-cert-v3 .verify .qr {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border: 1px solid rgba(26, 23, 20, 0.16);
  padding: 3px;
  background: #fff;
}

.vb-auth-cert-v3 .verify .qr img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.vb-auth-cert-v3 .verify__u {
  margin-top: 3px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.vb-auth-cert-v3 .verify__n {
  max-width: 190px;
  margin: 3px 0 0 auto;
  color: var(--ink-45);
  font-size: 7.2px;
  line-height: 1.45;
}

.vb-auth-cert-v3 .micro {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-top: 14px;
  color: rgba(176, 141, 79, 0.6);
  font-size: 4.4px;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.vb-auth-cert-v3 .legal {
  position: relative;
  z-index: 2;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  color: var(--ink-45);
  font-size: 7.4px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.vb-auth-cert-v3 .cert-watermark {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.vb-auth-cert-v3 .cert-watermark span {
  transform: rotate(-24deg);
  border: 2px solid rgba(176, 141, 79, 0.28);
  padding: 0.4em 0.9em;
  color: rgba(176, 141, 79, 0.24);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.vb-auth-cert-v3:not(.is-sample) .cert-watermark {
  display: none;
}

/*
 * Mobile: do NOT reflow the certificate. Keep the desktop sheet layout.
 * authenticity.js scales the full sheet to fit the viewport on open.
 */
@media (max-width: 920px) {
  .vb-auth-cert-modal {
    padding: 8px 0 24px;
    align-items: flex-start;
    justify-content: center;
  }

  .vb-auth-cert-modal__shell {
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
  }

  .vb-auth-cert-modal__close {
    position: sticky;
    top: 6px;
    float: none;
    margin: 0 0 8px auto;
    display: block;
  }

  .vb-auth-cert-modal__actions {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    margin-top: 10px;
  }

  .vb-auth-cert-page {
    padding: 8px 0 24px;
    overflow-x: hidden;
  }

  /* Fixed sheet geometry — never stack/reflow on mobile */
  .vb-auth-cert-v3 {
    width: 900px !important;
    min-height: 1273px;
    margin: 0;
  }

  .vb-auth-cert-v3 .edge,
  .vb-auth-cert-v3 .inner {
    min-height: inherit;
  }

  .vb-auth-cert-v3 .body {
    display: grid;
    grid-template-columns: 300px 1fr;
  }

  .vb-auth-cert-v3 .two {
    display: grid;
    grid-template-columns: 1fr 250px;
  }

  .vb-auth-cert-v3 .sign {
    display: grid;
    grid-template-columns: 1fr 104px 1fr;
  }

  .vb-auth-cert-v3 .hd {
    display: flex;
    flex-direction: row;
  }

  .vb-auth-cert-v3 .checks,
  .vb-auth-cert-v3 .limits {
    columns: 2;
  }

  .vb-auth-cert-v3 .photo img,
  .vb-auth-cert-v3 .photo-placeholder {
    width: 300px;
    height: 300px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  .vb-auth-cert-modal__close,
  .vb-auth-cert-modal__actions,
  .vb-auth-cert-page__actions {
    display: none !important;
  }

  .vb-auth-cert-modal,
  .vb-auth-cert-page {
    position: static;
    display: block !important;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .vb-auth-cert-v3 {
    width: 210mm;
    min-height: 297mm;
    box-shadow: none;
  }
}
