body.signing-active,
body.signature-portal {
  background: radial-gradient(ellipse at 90% 0%, #dceee6 0, transparent 48%), #f3f7f5;
  color: #183c32;
}
.signing-active .page,
.signing-active .signature-page {
  width: min(100% - 32px, 760px);
  margin: clamp(24px, 7vh, 64px) auto 32px;
}
.signing-active #signCard,
.signature-portal #apartmentPicker {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #d9e6df;
  border-top: 5px solid #176a55;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 60px #183c3210;
}
.signing-overview { margin-bottom: 28px; }
.signing-wordmark { margin: 0 0 18px; color: #176a55; font-size: 20px; font-weight: 800; }
.signing-building {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid #d6e8de;
  border-radius: 12px;
  background: #f1f8f4;
  color: #214d3d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.signing-active #signCard h1,
.signing-active #newSigningIntro h2 { font-size: clamp(28px, 5vw, 38px); letter-spacing: -.03em; line-height: 1.3; }
.signing-active #signCard > .intro,
.signing-active #newSigningIntro .intro { font-size: 16px; color: #536b61; line-height: 1.8; }
.signing-active .signature-start { width: 100%; min-height: 56px; border-radius: 12px; font-size: 17px; }
.signing-active footer { margin: 24px auto; color: #52685e; font-size: 12px; line-height: 1.9; }
.signing-active .signature-dialog,
.signature-portal .signature-dialog {
  width: min(820px, calc(100vw - 24px));
  max-width: 820px;
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid #d3e2d9;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 90px #102e2a40;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scroll-padding-block: 16px;
  touch-action: pan-y;
}
.signing-active .signature-dialog::backdrop,
.signature-portal .signature-dialog::backdrop { background: #102e2ab3; }
.signing-active .signature-dialog-heading { align-items: flex-start; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid #e2ebe5; }
.signing-active .signature-dialog-heading h2 { margin: 0; font-size: clamp(21px, 4vw, 27px); line-height: 1.5; }
.signing-active .signature-dialog-close { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #f0f5f2; color: #244c3c; }
.signature-building-address { margin: 18px 0; padding: 12px 16px; border-radius: 10px; background: #edf6f0; color: #244c3c; font-weight: 700; line-height: 1.7; }
.signing-active .legal { margin: 18px 0 24px; padding: clamp(16px, 3vw, 24px); border: 1px solid #e2e9e4; border-radius: 12px; background: #f8faf9; color: #435b50; font-size: 14px; line-height: 1.95; }
.signing-active .signature-dialog form { gap: 18px; }
.signing-active .signature-dialog label:not(.check) { gap: 8px; color: #244638; font-size: 14px; }
.signing-active .signature-dialog input:not([type="checkbox"]),
.signing-active .signature-dialog select,
.signature-portal #apartmentPickerSelect {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #becfc4;
  border-radius: 10px;
  background: #fff;
  color: #183c32;
  font-size: 16px;
}
.signing-active .signature-dialog :is(input, select, button):focus-visible { outline: 3px solid #176a55; outline-offset: 3px; }
.signing-active .signature-dialog select:invalid { color: #5b6d63; }
.signing-active #apartmentChoice { padding: 16px; border: 1px solid #d4e5d9; border-radius: 12px; background: #f4f9f6; }
.apartment-selection-error, .signature-portal #apartmentPickerMessage.apartment-selection-error { display: block; margin-top: 8px; color: #b42318; font-size: 14px; font-weight: 700; line-height: 1.6; }
.apartment-selection-error[hidden] { display: none; }
.signing-active .signature-dialog select[aria-invalid="true"] { border-color: #b42318; }
.signing-active .signature-dialog .check { margin: 0; gap: 12px; font-size: 14px; line-height: 1.8; }
.signing-active .signature-dialog .marketing-consent { color: #183c32; font-weight: 700; }
.signing-active .signature-dialog .check input { width: 20px; height: 20px; margin-top: 3px; }
.signing-active .signature-dialog .consent { padding: 16px; border-radius: 12px; color: #3b5548; }
.signing-active .signature-dialog canvas { height: 180px; border: 2px dashed #90ae9d; border-radius: 12px; background: #fcfefc; }
.signing-active .signature-head { padding-top: 8px; color: #183c32; }
.signing-active .signature-time-note { margin: 0; color: #53685d; }
.signing-active #submitButton { min-height: 56px; border-radius: 12px; font-size: 17px; }
.signing-active .signature-dialog .notice:not(:empty) { padding: 12px 14px; border-radius: 10px; background: #fff5ec; }
.offer-open { display: block; width: 100%; margin: 16px 0; padding: 14px 18px; border: 1px solid #9fbfaf; border-radius: 12px; background: #edf6f0; color: #17543d; cursor: pointer; }
.offer-open:hover { color: #fff; }
.offer-dialog { width: min(880px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: clamp(20px, 4vw, 32px); border: 1px solid #d3e2d9; border-radius: 20px; background: #fff; color: #244638; overflow: auto; overscroll-behavior: contain; }
.offer-dialog::backdrop { background: #102e2ab3; }
.expired-link-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: clamp(22px, 5vw, 34px); border: 1px solid #d3e2d9; border-top: 5px solid #b42318; border-radius: 18px; background: #fff; color: #183c32; box-shadow: 0 28px 90px #102e2a40; }
.expired-link-dialog::backdrop { background: #102e2ab3; }
.expired-link-dialog h2 { margin: 0 0 14px; font-size: clamp(21px, 4vw, 27px); line-height: 1.45; }
.expired-link-dialog p { margin: 0 0 24px; color: #435b50; font-size: 16px; line-height: 1.8; }
.expired-link-dialog .button { min-width: 120px; min-height: 48px; }
.offer-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.offer-dialog-heading h2 { margin: 0; font-size: clamp(20px, 4vw, 26px); line-height: 1.5; }
.offer-close { flex: none; width: 44px; min-height: 44px; border-radius: 50%; background: #edf5f0; }
.offer-address { padding: 12px; border-radius: 10px; background: #f1f8f4; font-weight: 700; line-height: 1.7; }
.offer-summary { margin: 18px 0 20px; padding: 24px; border: 1px solid #d4e5dc; border-radius: 20px; background: linear-gradient(145deg, #f3faf6, #fff); text-align: center; }
.offer-summary p { margin: 0; }
.offer-summary-label { font-size: 18px; font-weight: 700; }
.offer-summary-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 12px; }
.offer-summary-rate-card { min-width: 0; padding: 14px; border: 1px solid #dce8e0; border-radius: 14px; background: #fff; text-align: start; }
.offer-summary-rate-title { margin: 0 0 8px; color: #17543d; font-size: 16px; }
.offer-summary-rate-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0 0; border-top: 1px solid #e7eee9; font-size: 13px; line-height: 1.5; }
.offer-summary-rate-current { color: #53685d; }
.offer-summary-rate-offer { color: #17543d; font-weight: 700; }
.offer-summary-rate-value { flex: none; font-size: 16px; font-weight: 800; white-space: nowrap; }
.offer-summary-no-data { padding: 10px 12px; border-radius: 10px; background: #fff2df; color: #704a16; font-weight: 700; line-height: 1.6; }
.offer-summary-note { margin-top: 12px !important; color: #53685d; font-size: 12px; line-height: 1.7; }
.offer-actions { margin-top: 20px; text-align: center; }
.offer-sign-button { width: 100%; min-height: 56px; padding: 14px 18px; border: 0; border-radius: 14px; background: #17543d; color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px #17543d26; }
.offer-sign-button:hover { background: #103f2d; }
.offer-actions p { margin: 8px 0 0; color: #53685d; font-size: 12px; line-height: 1.7; }
.offer-details { margin-top: 20px; border-top: 1px solid #dce8e0; }
.offer-details > summary { padding: 16px 0; color: #17543d; font-weight: 700; cursor: pointer; }
.offer-details > summary:focus-visible { outline: 3px solid #176a55; outline-offset: 3px; }
.offer-table-wrapper { max-width: 100%; margin: 18px 0; overflow-x: auto; overscroll-behavior-x: contain; }
.offer-comparison { width: 100%; min-width: 680px; table-layout: fixed; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.offer-comparison caption { padding: 12px 0; text-align: right; color: #244638; font-size: 16px; font-weight: 700; }
.offer-comparison :is(th, td) { padding: 12px 8px; border-bottom: 1px solid #e0eae4; text-align: right; overflow-wrap: anywhere; }
.offer-comparison thead { background: #edf6f0; }
.offer-comparison td { font-variant-numeric: tabular-nums; }
.offer-comparison bdi { unicode-bidi: isolate; }
.offer-vat-prices { display: grid; gap: 10px; }
.offer-vat-prices > div { display: grid; gap: 3px; }
.offer-vat-prices span { color: #53685d; font-size: 11px; font-weight: 400; }
.offer-vat-before bdi { color: #53685d; font-size: 13px; font-weight: 400; }
.offer-vat-included { padding-top: 8px; border-top: 1px solid #dce8e0; }
.offer-vat-included bdi { font-weight: 700; }
.offer-savings-line { padding: 0; }
.offer-savings-value { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.offer-savings-badge { display: inline-flex; align-items: baseline; gap: 4px; color: #15513b; white-space: nowrap; }
.offer-vat-prices .offer-savings-badge,
.offer-vat-prices .offer-savings-badge span { color: #15513b; }
.offer-savings-percent { font-size: clamp(18px, 2.5vw, 23px); font-weight: 900; line-height: 1.15; }
.offer-savings-word { font-size: 12px; font-weight: 700; }
.offer-savings-amount { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px; color: #15513b; font-size: 14px; font-weight: 800; }
.offer-vat-prices .offer-savings-increase .offer-savings-badge,
.offer-vat-prices .offer-savings-increase .offer-savings-badge span { color: #8c2f27; }
.offer-savings-increase .offer-savings-amount { color: #8c2f27; }
.offer-vat-prices .offer-savings-unchanged .offer-savings-badge,
.offer-vat-prices .offer-savings-unchanged .offer-savings-badge span { color: #52635b; }
.offer-savings-unavailable { color: #62502e; font-size: 12px; font-weight: 700; }
.offer-comparison .offer-new-price { color: #15513b; font-weight: 700; background: #f5faf7; }
.offer-comparison .offer-final-row { font-weight: 700; border-top: 2px solid #bddbc9; background: #edf6f0; }
.offer-savings { padding: 16px; border: 1px solid #bddbc9; border-radius: 12px; background: #edf7f0; color: #15513b; font-size: 18px; font-weight: 700; line-height: 1.8; }
.offer-disclaimer { padding: 14px; border: 1px solid #e4dac0; border-radius: 12px; background: #fffaf0; color: #62502e; font-size: 13px; line-height: 1.9; }
.offer-terms { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 18px; padding: 16px 0; font-size: 14px; }
.offer-terms dt { font-weight: 700; }
.offer-terms dd { margin: 0; overflow-wrap: anywhere; }
.offer-dialog :focus-visible, .offer-open:focus-visible { outline: 3px solid #176a55; outline-offset: 3px; }
@media (max-width: 520px) {
  .offer-dialog { padding: 16px; }
  .offer-summary { padding: 16px 12px; }
  .offer-summary-rates { grid-template-columns: 1fr; gap: 8px; }
  .offer-summary-rate-card { padding: 12px; }
  .offer-comparison { min-width: 0; }
  .offer-comparison, .offer-comparison tbody { display: block; }
  .offer-comparison caption { display: block; }
  .offer-comparison thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .offer-comparison tbody tr { display: block; margin-bottom: 12px; padding: 8px 12px; border: 1px solid #dce8e0; border-radius: 12px; }
  .offer-comparison tbody th { display: block; padding: 8px 0; border: 0; }
  .offer-comparison tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; font-size: 13px; }
  .offer-comparison tbody td::before { content: attr(data-label); flex: 1; color: #53685d; font-size: 12px; font-weight: 400; }
  .offer-comparison tbody td bdi { max-width: 65%; text-align: end; overflow-wrap: anywhere; }
  .offer-comparison tbody td .offer-vat-prices { max-width: 68%; text-align: end; }
  .offer-comparison tbody td .offer-vat-prices bdi { max-width: 100%; }
  .offer-comparison tbody td:last-child { border-bottom: 0; }
  .signing-active .page, .signing-active .signature-page { width: calc(100% - 24px); margin-top: 18px; }
  .signing-active .signature-dialog .fields { grid-template-columns: minmax(0, 1fr); }
  .signing-active .signature-dialog { border-radius: 16px; }
  .signing-active .signature-dialog .legal { font-size: 14px; }
}
