/* Certificate print: A4 landscape, only #certificate is visible.
   Loaded with media="print" by present.html, so these rules only ever
   apply while printing/print-previewing — the @media print wrapper below
   is kept anyway as a safety net in case the link tag's media attribute
   is ever dropped by a future edit. */
@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  * { box-shadow: none !important; text-shadow: none !important; }

  body {
    background: #fff !important;
    color: #1a1405 !important;
  }

  /* Hide the entire app chrome — only #certificate survives print. */
  .top-bar, .no-print, #presentContent { display: none !important; }

  .print-only, #certificate {
    display: block !important;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  .cert-border {
    box-sizing: border-box;
    width: 100%;
    min-height: 100%;
    padding: 30px 50px;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1405;
    background: #fffdf6;
    border: 10px double #8a6d1f;
    outline: 2px solid #8a6d1f;
    outline-offset: -18px;
    position: relative;
  }

  .cert-kicker {
    letter-spacing: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #8a6d1f;
    margin: 6px 0 0;
  }

  .cert-org {
    font-size: 1rem;
    color: #555;
    margin: 2px 0 18px;
    font-style: italic;
  }

  #certName {
    font-size: 2.8rem;
    margin: 10px 0;
    color: #1a1405;
    border-bottom: 2px solid #8a6d1f;
    display: inline-block;
    padding: 0 20px 8px;
  }

  .cert-city-line {
    font-size: 1.6rem;
    margin: 14px 0 6px;
  }

  .cert-flagbar {
    height: 14px;
    width: 60%;
    margin: 10px auto 18px;
    border-radius: 4px;
    border: 1px solid #8a6d1f;
  }

  .cert-seals {
    margin: 10px 0 18px;
  }

  .cert-seal {
    display: inline-block;
    border: 2px solid #8a6d1f;
    border-radius: 999px;
    padding: 6px 16px;
    margin: 4px;
    font-size: 0.95rem;
    font-weight: bold;
    background: #fbf3d9;
  }

  .cert-award-line {
    font-size: 1.15rem;
    margin: 22px 0 10px;
  }

  .cert-date {
    font-size: 1rem;
    color: #555;
    margin: 6px 0 30px;
  }

  .cert-sig {
    display: inline-block;
    margin-top: 10px;
  }

  .cert-sig-line {
    width: 260px;
    border-top: 1px solid #1a1405;
    margin: 0 auto 6px;
  }
}
