    .page {
      --line: #ddd5ca;
      --gold: #c2a25a;
      --accent: #1a2f4d;
      --ink: #1b1f27;
      --muted: #5a6672;
      box-sizing: border-box;
      flex: none;
      font-family: "Trebuchet MS", "Gill Sans", sans-serif;
      width: 210mm;
      height: 297mm;
      background: #fff;
      border: 1px solid var(--line);
      box-shadow: 0 20px 40px rgba(22, 27, 35, 0.12);
      position: relative;
      padding: 24mm;
      display: grid;
      align-content: center;
      gap: 12px;
      overflow: hidden;
    }

    .page::before {
      content: "";
      position: absolute;
      inset: 10mm;
      border: 2px solid var(--gold);
      pointer-events: none;
    }

    .page::after {
      content: "";
      position: absolute;
      inset: 14mm;
      border: 1px solid rgba(194, 162, 90, 0.35);
      pointer-events: none;
    }

    .cert-logo {
      position: absolute;
      left: 50%;
      top: 24mm;
      max-width: 60mm;
      max-height: 24mm;
      object-fit: contain;
      display: none;
      transform: translateX(-50%) scale(1);
      transform-origin: top center;
    }

    .cert-title {
      font-family: "Palatino Linotype", "Book Antiqua", serif;
      font-size: 38px;
      text-align: center;
      color: var(--accent);
      letter-spacing: 0.14em;
      text-transform: uppercase;
    }

    .cert-recipient {
      font-family: "Palatino Linotype", "Book Antiqua", serif;
      font-size: 36px;
      text-align: center;
      color: #111;
    }

    .cert-body {
      text-align: center;
      font-size: 16px;
      color: var(--muted);
      line-height: 1.8;
      padding: 0 16mm;
      margin-left: -4mm;
      margin-top: -4mm;
    }

    .cert-footer {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
      margin-top: 12px;
      align-items: start;
    }

    .sig {
      position: relative;
      padding-top: 12px;
      text-align: center;
      font-size: 14px;
      color: var(--muted);
    }

    .sig::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: var(--line);
    }

    .sig-image {
      display: none;
      max-width: 80mm;
      max-height: 22mm;
      object-fit: contain;
      transform-origin: top center;
      margin: 0 auto 6px;
    }

    .org-logo {
      display: none;
      max-width: 70mm;
      max-height: 20mm;
      object-fit: contain;
      margin: 0 auto 8px;
      transform-origin: top center;
    }


    .sig strong {
      display: block;
      color: var(--ink);
      font-weight: 700;
      margin-bottom: 4px;
    }

    .theme-modern {
      background: #ffffff;
    }

    .theme-modern::before,
    .theme-modern::after {
      border-color: rgba(26, 47, 77, 0.35);
    }

    .theme-modern .cert-title {
      letter-spacing: 0.08em;
    }

    .theme-minimal {
      background: #ffffff;
    }

    .theme-minimal::before,
    .theme-minimal::after {
      border: none;
    }

    .theme-minimal .cert-title {
      letter-spacing: 0.04em;
    }

    .watermark {
      position: absolute;
      inset: 0;
      opacity: 0.18;
      pointer-events: none;
      background-repeat: repeat;
      background-size: 260px 180px;
      background-position: 0 0;
    }

    .cert-bottom {
      position: absolute;
      bottom: 18mm;
      left: 24mm;
      right: 24mm;
      text-align: center;
      font-size: 13px;
      color: var(--muted);
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }


.page :is(.cert-title,.cert-recipient,.cert-body,.cert-bottom,.sig strong){overflow-wrap:anywhere}
