/* Membership application form (src/content/membership/application-form.njk),
   also used by the enquiry form (src/content/membership/enquiry.njk).
   Screen styles first, then @media print, which turns the same markup into
   an A4 paper form. */

/* Sits inside page.njk's .prose column */
.af-wrap {
  --af-line: #b9c3cf;
  --af-prompt: #7b8794;
  --af-radius: 0.4rem;
}

/* Honeypot field: off-screen rather than display:none, which some bots skip */
.af-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.af-intro,
.af-lead {
  color: var(--color-ink-soft);
  font-size: var(--step--1);
  margin: 0 0 var(--space-3);
}

.req {
  color: #b42318;
}

.print-only {
  display: none;
}

/* ---------- Sections ---------- */

.af-section,
.af-notes {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 39, 102, 0.06);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.af-section[hidden] {
  display: none;
}

.af-section h2,
.af-notes h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-1);
  color: var(--color-navy);
  margin: 0 0 var(--space-3);
}

.af-num {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: 0.9rem;
  flex: none;
}

.af-sub {
  font-size: var(--step-0);
  color: var(--color-navy);
  margin: var(--space-3) 0 var(--space-2);
}

/* Footnote reference: a small numbered pill linking to the notes */
.fn {
  display: inline-grid;
  place-items: center;
  height: 1.15rem;
  padding: 0 0.45rem;
  border-radius: 0.6rem;
  white-space: nowrap;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  vertical-align: super;
}

.fn:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ---------- Floating-label fields ---------- */

.ff {
  position: relative;
  margin-bottom: var(--space-2);
}

.ff input,
.ff textarea,
.ff select {
  display: block;
  width: 100%;
  font: inherit;
  font-size: var(--step-0);
  color: var(--color-ink);
  background: var(--color-white);
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius);
  padding: 0.85rem 0.9rem 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Date boxes: the browser's "dd/mm/yyyy" prompt in the same grey as the
   other prompts while empty (data-empty is set by application-form.js) */
.ff input[type="date"] {
  min-width: 12.5rem;
}

.ff input[type="date"][data-empty]:not(:focus) {
  color: var(--af-prompt);
}

.ff input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: 0.5rem;
  opacity: 0.6;
  cursor: pointer;
}

.ff textarea {
  resize: vertical;
  min-height: 3.2rem;
  line-height: 1.45;
}

.ff input:hover,
.ff textarea:hover,
.ff select:hover {
  border-color: #8d9aa8;
}

.ff input:focus,
.ff textarea:focus,
.ff select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(4, 84, 164, 0.15);
}

.ff label {
  position: absolute;
  left: 0.6rem;
  top: 0.85rem;
  padding: 0 0.3rem;
  max-width: calc(100% - 1.2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.5;
  color: var(--af-prompt);
  background: transparent;
  pointer-events: none;
  transform-origin: left top;
  transition: top 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

/* Floated: on focus, once filled, or always for date/select boxes */
.ff input:focus + label,
.ff input:not(:placeholder-shown) + label,
.ff textarea:focus + label,
.ff textarea:not(:placeholder-shown) + label,
.ff--fixed label {
  top: 0;
  transform: translateY(-50%) scale(0.78);
  background: var(--color-white);
  color: var(--color-ink-soft);
  font-weight: 600;
}

.ff input:focus + label,
.ff textarea:focus + label,
.ff select:focus + label {
  color: var(--color-accent);
}

.ff-hint {
  margin: 0.25rem 0 0 0.9rem;
  font-size: 0.75rem;
  color: var(--af-prompt);
}

/* Invalid, but only once the person has tried to submit/print */
.af.was-checked .ff :invalid {
  border-color: #d92d20;
}

.af.was-checked .ff :invalid + label {
  color: #d92d20;
}

.af.was-checked .choices:has(:invalid) .choice-box,
.af.was-checked .consent:has(:invalid) {
  border-color: #d92d20;
}

.af.was-checked .ticks:has(:invalid) .tick {
  color: #d92d20;
}

.af.was-checked .yn-cell:has(:invalid) .yn span {
  border-color: #d92d20;
}

/* ---------- Layout helpers ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--space-2);
}

.grid--title {
  grid-template-columns: 9rem 1fr;
}

.grid--postcode {
  grid-template-columns: 1fr 8.5rem;
}

/* Applicant 2 has the "Same as Applicant 1" tick in place of the heading;
   both get the same height so the address boxes line up across columns */
.address-head {
  display: flex;
  align-items: center;
  min-height: 1.5rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--color-navy);
  margin: var(--space-2) 0 var(--space-2);
}

.address[hidden] {
  display: none;
}

.applicants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* When only one applicant (or one proposer column) is shown, use full width */
.applicants:has(> .applicant:only-child),
.applicants:has(> [hidden]) {
  grid-template-columns: 1fr;
}

/* "How many?" blocks (additional family members): two columns once a
   second block is shown */
@media (min-width: 721px) {
  .applicants:has(> [data-count-from]:not([hidden])) {
    grid-template-columns: 1fr 1fr;
  }
}

.applicant {
  border: 0;
  border-top: 2px solid var(--color-navy);
  border-radius: 0;
  padding: var(--space-2) 0 0;
  margin: 0;
  min-width: 0;
}


.applicant legend {
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--color-navy);
  padding: 0 0.5rem 0 0;
  margin-bottom: var(--space-1);
}

.legend-note {
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--color-ink-soft);
}

/* ---------- Choice cards (radios) ---------- */

.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.choices--compact {
  grid-template-columns: repeat(2, minmax(0, 18rem));
}

.choice {
  position: relative;
  font-weight: 400;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.choice-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 0.9rem 1rem 0.9rem 2.6rem;
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius);
  background: var(--color-white);
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-box::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 1.05rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--af-line);
  border-radius: 50%;
  background: var(--color-white);
}

.choice-box strong {
  color: var(--color-navy);
}

.choice-box small {
  color: var(--color-ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}

.choice:hover .choice-box {
  border-color: #8d9aa8;
}

.choice input:focus-visible + .choice-box {
  box-shadow: 0 0 0 3px rgba(4, 84, 164, 0.25);
}

.choice input:checked + .choice-box {
  border-color: var(--color-accent);
  background: #f0f6fd;
}

.choice input:checked + .choice-box::before {
  border-color: var(--color-accent);
  background: radial-gradient(circle, var(--color-accent) 0 45%, var(--color-white) 50%);
}

/* ---------- Yes/No pills ---------- */

.yn {
  position: relative;
  font-weight: 400;
  cursor: pointer;
}

.yn input {
  position: absolute;
  opacity: 0;
}

.yn span {
  display: inline-block;
  min-width: 3.6rem;
  text-align: center;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--af-line);
  border-radius: 2rem;
  font-size: var(--step--1);
  background: var(--color-white);
}

.yn input:checked + span {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.yn input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(4, 84, 164, 0.25);
}

.yn-cell {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
  margin-bottom: var(--space-2);
}

.yn-cell[hidden] {
  display: none;
}

/* A Yes/No question on its own row: the question, then the pills */
.yn-rows {
  margin-bottom: var(--space-2);
}

.yn-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--color-border);
}

.yn-row:first-child {
  border-top: 1px solid var(--color-border);
}

.yn-row .yn-cell {
  margin-bottom: 0;
}

.yn-q {
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- Tickboxes ---------- */

.ticks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-2);
}

.tick {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  font-size: var(--step--1);
  cursor: pointer;
}

.tick input {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  accent-color: var(--color-accent);
}

[data-cond="interest-other"][hidden],
[data-show-if][hidden],
[data-hide-if][hidden],
[data-count-from][hidden] {
  display: none;
}

/* A single tick inside an applicant's column (e.g. "A Club Member") */
.applicant > .tick {
  margin: 0 0 var(--space-2);
}

/* ---------- Dependents ---------- */

.ff--select {
  max-width: 24rem;
  margin-bottom: var(--space-3);
}

.ff select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-ink-soft) 50%),
    linear-gradient(135deg, var(--color-ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 50%, calc(100% - 0.8rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
  cursor: pointer;
}

.dependent {
  display: grid;
  grid-template-columns: 2rem 1fr 1fr 12.5rem;
  gap: 0 var(--space-2);
  align-items: start;
}

.dependent[hidden] {
  display: none;
}

.dependent-num {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-top: 0.7rem;
  border-radius: 50%;
  border: 1px solid var(--af-line);
  color: var(--color-ink-soft);
  font-size: 0.85rem;
}

/* ---------- Per-applicant pairs (section 5) ---------- */

.pairs {
  margin-bottom: var(--space-2);
}

.pair-head,
.pair {
  display: grid;
  grid-template-columns: 13rem 1fr 1fr;
  gap: 0 var(--space-2);
  align-items: start;
}

.pair-head span {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--color-navy);
  padding-bottom: var(--space-1);
}

.af[data-partner="Individual"] .pair-head,
.af[data-partner="Individual"] .pair {
  grid-template-columns: 13rem 1fr;
}

.pair-label {
  font-size: var(--step--1);
  font-weight: 600;
  padding-top: 0.7rem;
  line-height: 1.35;
}

.pair-label small {
  display: block;
  font-weight: 400;
  color: var(--color-ink-soft);
  font-size: 0.75rem;
}

/* ---------- Consent and signatures ---------- */

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: 400;
  font-size: var(--step--1);
  line-height: 1.5;
  padding: var(--space-2);
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius);
  background: var(--color-surface-alt);
  cursor: pointer;
}

.consent + .consent {
  margin-top: var(--space-2);
}

.consent input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  flex: none;
  accent-color: var(--color-accent);
}

.sig-row {
  display: grid;
  grid-template-columns: 10rem 1fr 12.5rem;
  gap: 0 var(--space-2);
  align-items: start;
}

.sig-row[hidden] {
  display: none;
}

.sig-who {
  font-weight: 600;
  font-size: var(--step--1);
  padding-top: 0.8rem;
  line-height: 1.3;
}

.sig-who small {
  display: block;
  font-weight: 400;
  color: var(--color-ink-soft);
  font-size: 0.75rem;
}

/* ---------- Security check (partials/captcha.njk) ---------- */

.captcha-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.captcha-img {
  display: block;
  width: 200px;
  height: 70px;
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius);
}

.captcha-row .btn-outline {
  color: var(--color-accent);
}

.captcha-status {
  margin: 0 0 var(--space-2);
  font-size: var(--step--1);
  color: var(--color-ink-soft);
}

.captcha-status:empty {
  display: none;
}

/* Wide enough for the whole "Characters in the picture *" prompt */
.captcha-answer {
  max-width: 20rem;
}

/* ---------- Actions ---------- */

.af-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-4) 0 var(--space-5);
}

.af-actions .btn-outline {
  color: var(--color-accent);
}

.af-actions .btn-outline:hover,
.af-actions .btn-outline:focus-visible {
  background: #f0f6fd;
}

.af-actions p {
  margin: var(--space-1) 0 0;
  flex: 1 1 100%;
  font-size: var(--step--1);
  color: var(--color-ink-soft);
}

.af-error {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid #f4b4ae;
  border-left: 4px solid #d92d20;
  border-radius: var(--af-radius);
  background: #fef3f2;
  color: #912018;
  font-size: var(--step--1);
}

.af-error[hidden] {
  display: none;
}

/* ---------- Notes ---------- */

.notes {
  list-style: none;
  counter-reset: note;
  padding: 0;
  margin: 0;
}

.notes > li {
  counter-increment: note;
  position: relative;
  padding: var(--space-2) 0 var(--space-2) 2.6rem;
  border-top: 1px solid var(--color-border);
  scroll-margin-top: 6rem;
  font-size: var(--step--1);
  line-height: 1.6;
}

.notes > li::before {
  content: counter(note, upper-alpha);
  position: absolute;
  left: 0;
  top: var(--space-2);
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.8rem;
}

.notes > li:target {
  background: #fffbea;
}

.notes h3 {
  font-size: var(--step-0);
  color: var(--color-navy);
  margin: 0.15rem 0 0.4rem;
}

.notes p,
.notes ul,
.notes ol {
  margin: 0 0 0.5rem;
}

.notes ul,
.notes ol {
  padding-left: 1.2rem;
}

/* Club footer: print only, since on screen the site footer has it */
.af-club {
  display: none;
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-ink-soft);
  text-align: center;
}

.af-actions--end {
  margin-top: 0;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 720px) {
  .af-section,
  .af-notes {
    padding: var(--space-3) var(--space-2);
  }

  .applicants,
  .choices,
  .choices--compact {
    grid-template-columns: 1fr;
  }

  .dependent {
    grid-template-columns: 2rem 1fr 1fr;
  }

  .dependent > .ff:last-child {
    grid-column: 2 / -1;
  }

  .pair-head {
    display: none;
  }

  .yn-row {
    grid-template-columns: 1fr;
  }

  .pair,
  .af[data-partner="Individual"] .pair {
    grid-template-columns: 1fr 1fr;
  }

  .pair-label {
    grid-column: 1 / -1;
    padding-top: 0;
    margin-bottom: var(--space-1);
  }

  .sig-row {
    grid-template-columns: 1fr 12.5rem;
  }

  .sig-who {
    grid-column: 1 / -1;
    padding-top: 0;
    margin-bottom: var(--space-1);
  }
}

@media (max-width: 480px) {
  .grid,
  .grid--title,
  .sig-row {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   PRINT: an A4 paper form that mirrors the screen layout.
   - Site chrome, hero and buttons are hidden; a letterhead is shown instead.
   - Every label sits on the box border, so empty boxes are still labelled.
   - Sections that depend on a choice not yet made are printed in full
     (both applicants, all five dependents, proposer/seconder).
   ===================================================================== */

@page {
  size: A4;
  margin: 12mm 12mm 14mm;
}

@media print {
  html {
    font-size: 9pt;
  }

  body {
    background: #fff;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .page-hero,
  .page-media,
  .af-hp,
  .no-print,
  .screen-only,
  .ff-hint,
  .lightbox-dialog {
    display: none !important;
  }

  .print-only {
    display: initial;
  }

  .af-print-head.print-only {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8mm;
    padding-bottom: 4mm;
    margin-bottom: 4mm;
    border-bottom: 1.5pt solid var(--color-navy);
  }

  .af-print-head img {
    width: 62mm;
    height: auto;
  }

  .af-print-head h1 {
    font-size: 17pt;
    color: var(--color-navy);
    margin: 0;
    text-align: right;
  }

  .af-print-head p {
    margin: 1mm 0 0;
    font-size: 7.5pt;
    color: var(--color-ink-soft);
    text-align: right;
  }

  /* page.njk's wrappers: use the full paper width */
  main > section {
    padding: 0;
    border: 0;
  }

  main .container,
  main .prose {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .af-intro {
    font-size: 8.5pt;
    margin-bottom: 3mm;
  }

  .af-section {
    box-shadow: none;
    border: 0.75pt solid #c5cdd6;
    border-radius: 2mm;
    padding: 3.5mm 4mm 1.5mm;
    margin-bottom: 2.5mm;
  }

  .af-section h2,
  .af-sub,
  .af-lead {
    break-after: avoid;
  }

  .dependent,
  .pair,
  .sig-row,
  .choices,
  .consent,
  .ff {
    break-inside: avoid;
  }

  .af-section h2 {
    font-size: 11.5pt;
    margin-bottom: 3.5mm;
  }

  .af-num {
    width: 5.5mm;
    height: 5.5mm;
    font-size: 8pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .af-lead {
    font-size: 8.5pt;
    margin-bottom: 3mm;
  }

  .fn {
    border: 0;
    background: none;
    min-width: 0;
    padding: 0 0 0 0.5mm;
    font-size: 7pt;
    color: var(--color-accent);
  }

  /* Boxes: always show the label on the border */
  /* The label sits inside .ff's top padding, straddling the box border, so
     it can't get separated from its box at a page break */
  .ff {
    margin-bottom: 1.5mm;
    padding-top: 2mm;
  }

  .ff input,
  .ff textarea,
  .ff select {
    border: 0.75pt solid #8d9aa8;
    border-radius: 1.5mm;
    padding: 2.4mm 2.5mm 1.6mm;
    min-height: 8mm;
    font-size: 9.5pt;
    box-shadow: none;
    background: #fff;
  }

  .ff textarea {
    resize: none;
    overflow: hidden;
  }

  .ff label {
    top: 0 !important;
    transform: scale(0.82) !important;
    line-height: 1.2;
    background: #fff;
    color: var(--color-ink-soft) !important;
    font-weight: 600;
  }

  /* Empty date inputs print "dd/mm/yyyy" in grey, which is a useful prompt */
  .ff input[type="date"] {
    min-width: 0;
  }

  .ff input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
  }

  /* Radios and checkboxes become drawn boxes */
  .choice-box {
    padding: 2.2mm 2.5mm 2.2mm 8mm;
    border: 0.75pt solid #8d9aa8;
    background: #fff !important;
  }

  .choice-box::before {
    left: 2.5mm;
    top: 2.6mm;
    width: 3.2mm;
    height: 3.2mm;
    border-width: 0.75pt;
    border-color: #555;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .choice-box small {
    font-size: 7.5pt;
  }

  .choice input:checked + .choice-box::before {
    background: radial-gradient(circle, #000 0 45%, #fff 50%);
  }

  .yn span {
    border: 0.75pt solid #8d9aa8;
    padding: 0.8mm 3mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .consent {
    background: #fff;
    border: 0.75pt solid #8d9aa8;
    font-size: 8.5pt;
    padding: 2.5mm 3mm;
  }

  .consent input {
    width: 3.6mm;
    height: 3.6mm;
  }

  /* Choices not yet made: print everything so a blank form is complete */
  .af[data-partner=""] .applicant[hidden],
  .af[data-partner=""] .ff.cond-partner[hidden],
  .af[data-type=""] .af-section[hidden],
  .af [data-cond="interest-other"][hidden],
  .af [data-show-if][hidden],
  .af [data-hide-if][hidden],
  .af [data-count-from][data-count-blank][hidden] {
    display: block !important;
  }

  .af[data-partner=""] .pair-head span[hidden] {
    display: inline !important;
  }

  .af[data-partner=""] .yn-cell[hidden] {
    display: flex !important;
  }

  .af[data-partner=""] .sig-row[hidden],
  .af[data-dependents=""] .dependent[hidden] {
    display: grid !important;
  }

  .af[data-partner=""] .applicants,
  .applicants:has(> [data-count-blank]) {
    grid-template-columns: 1fr 1fr;
  }

  .applicants {
    gap: 4mm;
  }

  .choices {
    gap: 3mm;
    grid-template-columns: repeat(3, 1fr);
  }

  .choices--compact {
    grid-template-columns: repeat(2, 60mm);
  }

  .tick input {
    width: 3.4mm;
    height: 3.4mm;
  }

  .ticks {
    grid-template-columns: repeat(3, 1fr);
    gap: 1mm 3mm;
  }

  .tick {
    font-size: 8.5pt;
  }

  .applicant {
    border-top-width: 1pt;
    padding-top: 2mm;
  }

  .dependent {
    grid-template-columns: 6mm 1fr 1fr 34mm;
    gap: 0 3mm;
  }

  .dependent-num {
    width: 5mm;
    height: 5mm;
    margin-top: 1.8mm;
    font-size: 7.5pt;
  }

  .pair-head,
  .pair {
    grid-template-columns: 38mm 1fr 1fr;
    gap: 0 3mm;
  }

  .pair-label {
    padding-top: 1.5mm;
    font-size: 8.5pt;
  }

  .sig-row {
    grid-template-columns: 34mm 1fr 34mm;
    gap: 0 3mm;
  }

  .sig-row .ff input:not([type="date"]) {
    min-height: 11mm;
  }

  .sig-who {
    padding-top: 2.5mm;
    font-size: 8.5pt;
  }

  /* Notes start on a fresh page, in two columns to save paper */
  .af-notes {
    break-before: page;
    border: 0;
    padding: 0;
  }

  .af-notes h2 {
    font-size: 13pt;
    border-bottom: 1.5pt solid var(--color-navy);
    padding-bottom: 2mm;
  }

  .notes {
    columns: 2;
    column-gap: 7mm;
  }

  .notes > li {
    font-size: 8pt;
    line-height: 1.4;
    padding: 2mm 0 2mm 7mm;
    background: none !important;
  }

  .notes > li::before {
    width: 5mm;
    height: 5mm;
    top: 2mm;
    font-size: 7.5pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .notes h3 {
    font-size: 9.5pt;
  }

  .af-club {
    display: block;
    margin-top: 2mm;
    padding-top: 1.5mm;
    font-size: 7pt;
  }

  .af-notes a,
  .af-section a,
  .af-intro a {
    color: inherit;
    text-decoration: none;
  }

  .af-notes a.fn,
  .af-section a.fn,
  .af-intro a.fn {
    color: var(--color-accent);
  }
}
