/* Rental agreement page: readable on screen, clean when printed */

.nav a[aria-current="page"] { color: var(--red); }

.agreement-page { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(56px, 8vw, 96px); }
.agreement-head { border-bottom: 2px solid var(--graphite); padding-bottom: 24px; margin-bottom: 32px; }
.agreement-head h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); max-width: 20ch; }
.agreement-meta { color: var(--muted); margin: 0 0 16px; }
.agreement-intro p { max-width: 64ch; }
.agreement-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-print {
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 4px;
  padding: 10px 18px; background: var(--red); color: var(--white);
}
.btn-print:hover { background: var(--red-deep); }

.agreement-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }

.toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 6px; }
.toc h2 { font-size: 1rem; font-variation-settings: "wdth" 110; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--steel-line); }
.toc a {
  display: block; padding: 5px 0 5px 12px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; font-size: 0.92rem; line-height: 1.3;
}
.toc a:hover { color: var(--red-deep); border-left-color: var(--red); }

.agreement-body { max-width: 74ch; font-size: 1.02rem; line-height: 1.65; }
.agreement-body h2 {
  font-size: 1.35rem; font-variation-settings: "wdth" 110; line-height: 1.2;
  margin: 2.2em 0 0.6em; padding-top: 14px; border-top: 1px solid var(--steel-line);
  scroll-margin-top: 16px;
}
.agreement-body h2:first-of-type { margin-top: 1.4em; }
.agreement-body h3 { font-size: 1.05rem; margin: 1.6em 0 0.4em; scroll-margin-top: 16px; }
.agreement-body p { max-width: none; }
.agreement-body ul { padding-left: 1.3em; margin: 0 0 1em; }
.agreement-body li { margin-bottom: 0.45em; }
.agreement-body .warning {
  background: #fbe9eb; border-left: 4px solid var(--red); padding: 14px 16px; border-radius: 4px;
}

.sign-block { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin-top: 32px; }
.sign-line { border-bottom: 1.5px solid var(--graphite); min-height: 44px; display: flex; align-items: flex-end; }
.sign-line span { transform: translateY(1.6em); font-size: 0.85rem; color: var(--muted); font-style: italic; }
.sign-block { padding-bottom: 1.6em; }

.print-only { display: none; }

@media (max-width: 860px) {
  .agreement-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 1px solid var(--steel-line); border-radius: 6px; padding: 14px 16px; }
  .sign-block { grid-template-columns: 1fr; }
}

@media print {
  @page { margin: 0.7in; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  body { font-size: 10.5pt; color: #000; background: #fff; }
  .print-logo img { width: 2.2in; margin-bottom: 12pt; }
  .agreement-page { padding: 0; max-width: none; }
  .agreement-layout { display: block; }
  .agreement-head { margin-bottom: 12pt; padding-bottom: 8pt; }
  .agreement-head h1 { font-size: 18pt; }
  .agreement-body { max-width: none; font-size: 10.5pt; line-height: 1.45; }
  .agreement-body h2 { font-size: 12.5pt; margin-top: 16pt; break-after: avoid; }
  .agreement-body h3 { font-size: 11pt; break-after: avoid; }
  .agreement-body .warning { background: none; border: 1.5pt solid #000; }
  .sign-block { grid-template-columns: 1fr 1fr; break-inside: avoid; gap: 26pt 24pt; }
  .sign-line { border-bottom-color: #000; }
  a { color: #000; text-decoration: none; }
}
@media print {
  .ack { break-inside: avoid; page-break-inside: avoid; }
}
a.btn-print { display: inline-block; text-decoration: none; }
a.btn-print:hover { color: var(--white); }
.agreement-actions .text-link { font-weight: 700; color: var(--red-deep); }
