/* AILA quotation: a document, on screen and on paper (A4). Always on Paper. */
.q-body { background: #E9E4D8; padding: 0 0 60px; color: var(--ink); }
.q-tools { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; padding: 14px clamp(16px, 3vw, 40px); background: #E9E4D8; }
.q-tools .spacer { flex: 1; }
.q-body .q-tools .sh { display: none; }
@media (max-width: 760px) { .q-body .q-tools .lg { display: none; } .q-body .q-tools .sh { display: inline; } }
.doc {
  position: relative;
  width: min(210mm, calc(100vw - 24px)); min-height: 297mm; margin: 10px auto 0; background: var(--paper);
  padding: 16mm 15mm 14mm; box-shadow: 0 1px 0 rgba(var(--ink-rgb), .04), 0 30px 60px -40px rgba(var(--ink-rgb), .5);
  font-size: 10.5pt; line-height: 1.45;
}
.q-empty { padding: 40px; font-size: 18px; }
.q-empty h1 { font-family: var(--serif); font-weight: 400; font-size: 54px; font-style: italic; margin: 24px 0 8px; }
.q-empty .q-brand svg { width: 40px; }
.q-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1.5px solid var(--ink); padding-bottom: 10mm; }
.q-brand { display: flex; align-items: center; gap: 10px; }
.q-brand svg { width: 40px; }
.q-brand b { font-family: var(--serif); font-weight: 600; font-size: 22pt; letter-spacing: .02em; }
.q-title { text-align: right; }
.q-ref { font-family: var(--serif); font-size: 20pt; line-height: 1.1; margin-top: 2px; }
.q-meta { display: grid; grid-template-columns: 1.4fr 1.4fr 1.1fr .7fr; gap: 5mm; padding: 5mm 0; border-bottom: 1px solid var(--line); }
.q-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.q-meta .mono { font-size: 9pt; }
.q-meta span:not(.mono) { white-space: nowrap; }
.q-in { border: 0; border-bottom: 1px dashed var(--graphite); background: transparent; padding: 1px 0; font-size: 10.5pt; width: 100%; }
.q-in:focus { outline: none; border-bottom-color: var(--stamp); }
.q-print { display: none; }
.q-repriced { margin: 3mm 0 0; padding: 2mm 3mm; background: #EDE8DC; font-size: 9pt; }
.q-hero { padding: 7mm 0 4mm; }
.q-name { font-family: var(--serif); font-size: 15pt; line-height: 1.2; color: var(--ink); margin: 0 0 2mm; }
.q-hero h1 { font-family: var(--serif); font-weight: 400; font-size: 36pt; line-height: 1; margin: 0 0 3mm; letter-spacing: -.015em; }
.q-hero p { color: var(--graphite); margin: 0 0 3mm; }
.q-hero p.q-takes { color: var(--stamp); max-width: 150mm; }
.q-takes .mono { color: var(--stamp); margin-right: 1.5mm; }
.q-facts { margin: 4mm 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 2mm 10mm; }
.q-facts div { display: flex; flex-direction: column; gap: .5mm; }
.q-facts dt { font-size: 9pt; padding-top: 2px; }
.q-facts dd { margin: 0; }
.q-table, .q-sched { width: 100%; border-collapse: collapse; margin-top: 4mm; }
.q-table th { font-family: var(--mono); font-weight: 500; font-size: 9pt; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); text-align: left; border-bottom: 1px solid var(--ink); padding: 2mm 2mm 2mm 0; }
.q-table td { border-bottom: 1px solid var(--line); padding: 2.4mm 2mm 2.4mm 0; vertical-align: top; }
.q-table td b { font-weight: 500; display: flex; align-items: center; gap: 2mm; }
.q-table td small, .q-sched td small, .q-table tfoot small { display: block; color: var(--graphite); font-size: 9pt; font-weight: 400; }
.q-table .k-a, .q-table .k-h { width: 2.2mm; height: 2.2mm; }
.q-table .k-a { background: var(--ink); }
.q-table .k-h { background: var(--stamp); }
.q-table .q-base { color: var(--graphite); font-weight: 400; }
.q-table tr.q-grp td { border-bottom: 0; padding-bottom: 1mm; }
.q-table tr.q-hw td:first-child { padding-left: 4.2mm; }
.q-table tr.q-hw td { border-bottom-style: dashed; }
.q-table tr.q-sub td { color: var(--graphite); padding-top: 1.6mm; padding-bottom: 1.6mm; }
.q-table tr.q-sub td:first-child { padding-left: 4.2mm; }
.q-table tr.q-sub td.r { color: var(--ink); font-weight: 500; }
.q-table .r, .q-sched .r { text-align: right; white-space: nowrap; padding-right: 0; padding-left: 4mm; }
.q-table tfoot td { border-bottom: 0; border-top: 1.5px solid var(--ink); font-weight: 500; padding-top: 3mm; }
.q-table tfoot td.r { font-family: var(--serif); font-size: 18pt; font-weight: 400; vertical-align: top; }
.q-pay, .q-incl { margin-top: 7mm; }
.q-pay h2, .q-incl h2 { font-family: var(--mono); font-size: 9pt; letter-spacing: .1em; text-transform: uppercase; color: var(--stamp); margin: 0 0 1mm; font-weight: 600; }
.q-sched td { padding: 2mm 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.q-sched tr.t td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 500; }
.q-sched tr.q-rec td { border-bottom: 0; border-top: 1px dashed var(--line); padding-top: 3mm; }   /* round 17: hybrid each month, apart from the total */
.q-two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10mm; align-items: start; }
.q-incl ul { margin: 2mm 0 0; padding: 0; list-style: none; }
.q-incl h2 + ul + h2 { margin-top: 4mm; }
.q-incl li { padding: 1mm 0 1mm 5mm; position: relative; break-inside: avoid; }
.q-incl li::before { content: ""; position: absolute; left: 0; top: 2.6mm; width: 2mm; height: 2mm; background: var(--stamp); }
.q-note { white-space: pre-wrap; }
.q-foot { margin-top: 8mm; padding-top: 4mm; border-top: 1px solid var(--line); font-size: 9pt; color: var(--graphite); }
.q-foot p { margin: 0 0 2mm; }
.q-link { display: flex; flex-direction: column; gap: 1mm; }
.q-link a { color: var(--stamp); word-break: break-all; font-family: var(--mono); font-size: 9pt; }
.q-contact { display: flex; gap: 3mm; align-items: baseline; }

/* the reference, stamped last */
.q-hero { position: relative; }
.q-stamp {
  position: relative; display: inline-block; vertical-align: middle; margin-left: 5mm; top: -2mm; z-index: 2; pointer-events: none; line-height: 1.2;
  border: 2.5px solid var(--stamp); color: var(--stamp); border-radius: 3px; padding: 1.6mm 3mm 1.2mm;
  font-family: var(--mono); font-weight: 600; font-size: 10pt; letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(-5deg); opacity: .9; mix-blend-mode: multiply;
}
.q-stamp.is-wait { opacity: 0; }
.q-stamp.is-down { animation: stamp-down var(--stamp-ms) cubic-bezier(.3, 1.6, .5, 1) both, stamp-settle var(--stamp-settle-ms) ease-out var(--stamp-ms) forwards; }

@media (max-width: 760px) {
  .doc { padding: 20px 16px; min-height: 0; font-size: 14px; }
  .q-meta { grid-template-columns: 1fr 1fr; }
  .q-hero h1 { font-size: 34px; }
  .q-facts { grid-template-columns: 1fr; }
  .q-two { grid-template-columns: 1fr; gap: 0; }
  .q-tools .btn-line, .q-tools .btn-ink { font-size: 10px; padding: 10px 12px; }
  .q-stamp { font-size: 11px; padding: 5px 8px 4px; }
}

@page { size: A4; margin: 11mm 0 10mm; }
@media print {
  .q-body, html { background: #fff; padding: 0; }
  .q-tools { display: none !important; }
  .doc { width: 210mm; min-height: 0; height: auto; margin: 0; box-shadow: none; padding: 0 14mm; font-size: 8.9pt; line-height: 1.4; background: #fff; }
  .q-incl, .q-foot, .q-pay { break-inside: avoid; }
  .q-head { padding-bottom: 4mm; }
  .q-brand svg { width: 32px; }
  .q-brand b { font-size: 18pt; }
  .q-ref { font-size: 16pt; }
  .q-meta { padding: 2.6mm 0; }
  .q-repriced { margin-top: 2mm; padding: 1.4mm 2.5mm; font-size: 8pt; }
  .q-hero { padding: 3mm 0 0; }
  .q-hero h1 { font-size: 28pt; margin: 0 0 1.5mm; }
  .q-name { font-size: 13pt; }
  .q-hero p { margin-bottom: 2mm; }
  .q-facts { gap: 1mm; }
  .q-stamp { animation: none !important; opacity: .9 !important; font-size: 8pt; }
  .q-table { margin-top: 2mm; }
  .q-table th { padding: 1.4mm 2mm 1.4mm 0; }
  .q-table td { padding: 1.3mm 2mm 1.3mm 0; }
  .q-table td small, .q-sched td small, .q-table tfoot small { font-size: 7.3pt; }
  .q-table tfoot td { padding-top: 2mm; }
  .q-table tfoot td.r { font-size: 15pt; }
  .q-two { gap: 8mm; }
  .q-pay, .q-incl { margin-top: 3.5mm; }
  .q-sched { margin-top: 1.5mm; }
  .q-sched td { padding: 1.1mm 0; }
  .q-incl ul { margin-top: 1mm; }
  .q-incl li { padding: .35mm 0 .35mm 5mm; }
  .q-incl li::before { top: 1.6mm; }
  .q-foot { margin-top: 3.5mm; padding-top: 2.5mm; font-size: 7.3pt; }
  .q-foot p { margin-bottom: 1.1mm; }
  .q-link { flex-direction: row; gap: 3mm; align-items: baseline; }
  .q-link a { font-size: 6.8pt; }
  .mono, .q-table th, .q-meta .mono, .q-facts dt { font-size: 6.8pt; }
  .q-link .mono { white-space: nowrap; }
  .q-in { display: none; }
  .q-print { display: block; min-height: 1.2em; }
  .pl { opacity: 1 !important; transform: none !important; }
  a { text-decoration: none; }
  .q-table tr, .q-sched tr { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* what happens next, beside the document on a screen */
.q-next { position: sticky; top: 76px; width: 300px; margin-top: 10px; color: var(--ink); }
.q-next h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 8px 0 12px; }
.q-next ol { list-style: none; margin: 0; padding: 0; counter-reset: n; border-top: 1px solid rgba(var(--ink-rgb), .18); }
.q-next li { counter-increment: n; position: relative; padding: 12px 0 12px 28px; border-bottom: 1px solid rgba(var(--ink-rgb), .18); }
.q-next li::before { content: counter(n); position: absolute; left: 0; top: 13px; font-family: var(--mono); font-size: 13px; color: var(--graphite); }
.q-next b { display: block; font-weight: 500; font-size: 17px; }
.q-next span { display: block; color: var(--graphite); font-size: 16px; }
@media (max-width: 1100px) { .q-next { display: none; } }
@media print { .q-next { display: none !important; } }
.q-body .q-wrap { display: flex; justify-content: center; align-items: flex-start; gap: 32px; padding: 0 24px; }
