/* Narrow Sea NEXT — documents worth forwarding (quote/specimen + next-doc.js). Prefix nsd-.
   On screen: the page as designed, plus Download PDF. In print (and in the PDF Chrome makes from this page): an A4
   letterhead document — navy band and gold rule, reference and status block, premium table, numbered conditions,
   the specimen or certificate state on every page, and a running footer with the reference and page number. */

.nsd-lh, .nsd-state, .nsd-table, .nsd-list--cond, .nsd-subj, .nsd-watermark { display: none; }
.q-doc .q-actions .btn .ico { width: 16px; height: 16px; }

@media print {
  @page {
    size: A4;
    margin: 14mm 16mm 20mm;
    @bottom-left {
      content: "Issued through the Narrow Sea platform";
      font: 400 7.5pt/1.4 "Inter", system-ui, sans-serif; color: #647681; vertical-align: top; padding-top: 5mm;
    }
    @bottom-right {
      content: "Page " counter(page) " of " counter(pages);
      font: 400 7.5pt/1.4 "Inter", system-ui, sans-serif; color: #647681; vertical-align: top; padding-top: 5mm;
    }
  }

  html, body { background: #fff !important; }
  body { color: #273f4c; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .gnav, .foot, .toast-host, .desk, .desk-launch, .q-noprint, .skeleton, hr.divider { display: none !important; }
  main { opacity: 1 !important; animation: none !important; }
  .q-doc { padding: 0 !important; position: relative; }
  .q-doc > .wrap { padding: 0 !important; max-width: none !important; gap: 6.5mm; position: relative; z-index: 1; }

  /* ---------- letterhead ---------- */
  .nsd-lh { display: block; padding-bottom: 1.4mm; border-bottom: .6mm solid #c5a46d; margin-bottom: 1mm; break-inside: avoid; }
  .nsd-lh__band { background: #071c2b; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; padding: 7mm 8mm 6mm; }
  .nsd-lh__mark { font: 600 24pt/1 "Cormorant Garamond", Georgia, serif; letter-spacing: .07em; color: #fff; }
  .nsd-lh__tag { margin-top: 2.2mm; font: 400 8pt/1.3 "Inter", system-ui, sans-serif; color: #c5a46d; letter-spacing: .02em; }
  .nsd-lh__right { text-align: right; display: flex; flex-direction: column; gap: 1.6mm; }
  .nsd-lh__kind { font: 600 7.5pt/1.2 "Inter", system-ui, sans-serif; letter-spacing: .16em; color: #c5a46d; }
  .nsd-lh__ref { font: 500 11pt/1.2 "Inter", system-ui, sans-serif; color: #fff; letter-spacing: .01em; }

  /* ---------- title and notice ---------- */
  .q-doc .sec-head { gap: 1.5mm; break-after: avoid; }
  .q-doc .kicker { font-size: 7.5pt; letter-spacing: .06em; color: #647681; }
  .q-doc .h2 { font-size: 25pt; line-height: 1.1; color: #071c2b; }
  .q-doc .notice { padding: 3.2mm 4mm; border-left-width: .8mm; break-inside: avoid; }
  .q-doc .notice__title { font-size: 8.5pt; }
  .q-doc .notice__text { font-size: 8pt; }

  /* ---------- reference / period / status block ---------- */
  .q-doc-meta { display: grid; grid-template-columns: 1.05fr 1.15fr 1fr; gap: 0; border-top: .4mm solid #071c2b; border-bottom: .25mm solid #c9d3d8; break-inside: avoid; }
  .q-doc-meta > div { width: auto; max-width: none; gap: 1.6mm; padding: 3.4mm 4mm 3.6mm 0; }
  .q-doc-meta > div + div { padding-left: 4mm; border-left: .25mm solid #d8e0e4; }
  .q-doc-meta__label { font-size: 6.8pt; letter-spacing: .12em; color: #647681; }
  .q-doc-meta__ref { font-size: 13pt; line-height: 1.2; color: #071c2b; }
  .q-doc-meta__text { font-size: 8.5pt; line-height: 1.55; }
  .nsd-state { display: flex !important; flex-direction: column; }
  .nsd-state__status { font: 600 11pt/1.3 "Inter", system-ui, sans-serif; color: #071c2b; }
  .nsd-stamp { align-self: flex-start; margin-top: 1mm; font-size: 6.8pt; line-height: 1.35; letter-spacing: .06em; padding: 1.6mm 2.4mm; border-width: .35mm; text-transform: uppercase; text-wrap: balance; }
  .nsd-stamp--ok { color: #286652; border-color: #286652; }

  /* ---------- section headings and risk ---------- */
  .q-doc-h { font-size: 15pt; line-height: 1.2; color: #071c2b; padding-top: 1mm; break-after: avoid; }
  .q-doc-body { font-size: 9.5pt; line-height: 1.6; }

  /* ---------- premium ---------- */
  .q-doc .premium { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2.4mm 6mm;
    background: #fff; color: #273f4c; border: .35mm solid #071c2b; padding: 4.5mm 5mm; break-inside: avoid; }
  .q-doc .premium__label { grid-column: 1; font-size: 7.2pt; letter-spacing: .12em; color: #7a6337; }
  .q-doc .premium__total { grid-column: 2; grid-row: 1; font-size: 20pt; line-height: 1; color: #071c2b; text-align: right; }
  .q-doc .premium > :not(.premium__label):not(.premium__total) { grid-column: 1 / -1; }
  .q-doc .premium__lines, .q-doc .q-premium__terms { display: none !important; }
  .q-doc .premium__note { font-size: 7.8pt; color: #7a6337; }
  .q-doc .premium__fine { font-size: 7.2pt; color: #647681; }
  .nsd-table:not(:empty) { display: table; width: 100%; border-collapse: collapse; margin-top: 1mm; font: 400 8.8pt/1.4 "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
  .nsd-table th { font: 600 6.6pt/1.2 "Inter", system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #647681;
    text-align: left; padding: 0 2mm 1.6mm 0; border-bottom: .35mm solid #071c2b; }
  .nsd-table td { padding: 2mm 2mm 2mm 0; border-bottom: .2mm solid #d8e0e4; color: #273f4c; vertical-align: top; }
  .nsd-table td:first-child { color: #071c2b; font-weight: 600; }
  .nsd-table .num { text-align: right; padding-right: 0; padding-left: 3mm; white-space: nowrap; }
  .nsd-table tfoot td { border-bottom: 0; border-top: .35mm solid #071c2b; font-weight: 600; color: #071c2b; padding-top: 2.4mm; }
  .nsd-table tr { break-inside: avoid; }

  /* ---------- terms: title on the left, wording on the right ---------- */
  .q-doc .grid-3.q-cards { display: block; }
  .q-doc .q-card, .nsd-subj:not([hidden]) {
    display: grid; grid-template-columns: 40mm minmax(0, 1fr); gap: 0 6mm; min-height: 0;
    border: 0; border-top: .25mm solid #d8e0e4; border-radius: 0; padding: 3.2mm 0; background: none; break-inside: avoid;
  }
  .q-doc .q-cards > .q-card:last-child { border-bottom: .25mm solid #d8e0e4; }
  .q-doc .q-cards:has(+ .nsd-subj:not([hidden])) > .q-card:last-child { border-bottom: 0; }
  .q-doc .q-card .card__title, .nsd-subj__h { grid-column: 1; grid-row: 1 / span 3; font: 400 12.5pt/1.2 "Cormorant Garamond", Georgia, serif; color: #071c2b; }
  .q-doc .q-card .card__text, .q-doc .q-card .card__title + .card__text { grid-column: 2; margin: 0; font-size: 8.8pt; line-height: 1.6; color: #273f4c; }
  .q-doc .q-card [data-d="conditions"].is-listed { display: none; }
  .nsd-list--cond:not(:empty) { display: block; }
  .nsd-list { grid-column: 2; margin: 0; padding: 0; list-style: none; counter-reset: nsd; font: 400 8.8pt/1.55 "Inter", system-ui, sans-serif; color: #273f4c; }
  .nsd-list li { counter-increment: nsd; position: relative; padding-left: 7mm; break-inside: avoid; }
  .nsd-list li + li { margin-top: 1.2mm; }
  .nsd-list li::before { content: counter(nsd) "."; position: absolute; left: 0; top: 0; width: 5mm; font-weight: 600; color: #7a6337; font-variant-numeric: tabular-nums; }
  .nsd-subj { margin-top: -6.5mm; }   /* sits flush under the terms block */

  .q-doc .q-fine { font-size: 7.5pt; line-height: 1.55; }

  /* ---------- the state, on every page ---------- */
  .nsd-watermark:not([hidden]) {
    display: block; position: fixed; left: 50%; top: 50%; z-index: 5; pointer-events: none;
    transform: translate(-50%, -50%) rotate(-56deg); white-space: nowrap;
    font: 600 104pt/1 "Cormorant Garamond", Georgia, serif; letter-spacing: .12em; color: rgba(161, 63, 63, .075);
  }
}
