.s-heading {
  margin: 30px 0 34px;
  max-width: 720px;
}
.s-heading .lead {
  margin-top: 12px;
}
.s-steps {
  display: flex;
  gap: 34px;
  padding: 0;
  list-style: none;
  margin: 4px 0 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.s-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.s-steps li > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 11px;
}
.s-steps .active {
  color: var(--accent);
}
.s-steps .active > span {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
}
.s-steps .done > span {
  background: var(--soft);
  border-color: transparent;
  color: var(--accent);
}
.s-received {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--soft);
  border-radius: 40px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin: 6px 0 8px;
}
.s-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.s-section-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0 16px;
}
.s-section-line h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.s-tag {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.s-tag-success {
  background: var(--soft);
  border-color: transparent;
  color: var(--accent);
}
.s-document-list {
  border-top: 1px solid var(--border);
}
.s-document-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 23px 0;
  border-bottom: 1px solid var(--border);
}
.s-document-item > div {
  flex: 1;
  min-width: 0;
}
.s-document-item strong {
  font-size: 17px;
  font-weight: 600;
  display: block;
  line-height: 1.45;
}
.s-document-item p {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0 8px;
  line-height: 1.5;
}
.s-document-item small {
  font-size: 11px;
  color: var(--muted);
}
.s-file-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 62px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 28px;
  color: var(--accent);
}
.s-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  margin: 24px 0;
  border-radius: 12px;
  background: var(--soft);
  color: var(--accent);
  font-size: 13px;
  line-height: 1.65;
}
.s-note p {
  margin: 0;
}
.s-note > span {
  font-size: 22px;
}
.s-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0 12px;
  align-items: center;
}
.s-alternate {
  text-align: center;
  margin: 24px 0 0;
}
.s-alternate .button {
  font-size: 12px;
}
.s-reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 20px;
}
.s-reader-title {
  font-size: 24px;
  margin: 8px 0 0;
  line-height: 1.3;
}
.s-reader-actions {
  display: flex;
  gap: 8px;
}
.s-reader-actions .button {
  font-size: 12px;
  padding-inline: 15px;
}
.s-progress {
  height: 3px;
  background: var(--border);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 24px;
}
.s-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s;
}
.s-reader {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--soft);
}
.s-reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
}
.s-reader-toolbar .row {
  display: flex;
  gap: 5px;
  align-items: center;
}
.s-reader-toolbar .button {
  font-size: 13px;
  min-width: 42px;
  padding: 8px 12px;
}
.s-reader-toolbar .row span {
  min-width: 50px;
  text-align: center;
}
.s-page-scroll {
  min-height: 0;
  max-height: 480px;
  overflow: auto;
  padding: 30px;
  scroll-behavior: smooth;
}
.s-paper {
  width: 100%;
  min-width: 320px;
  max-width: 620px;
  margin: auto;
  padding: 40px 46px;
  background: #fff;
  color: #26332f;
  box-shadow: 0 3px 18px #172e3310;
  border: 1px solid #e3e7e2;
  border-radius: 2px;
  line-height: 1.8;
}
.s-paper h2 {
  font-size: 1.45em;
  line-height: 1.5;
  margin: 28px 0 9px;
  font-weight: 600;
}
.s-paper h3 {
  font-size: 0.84em;
  margin: 28px 0 8px;
}
.s-paper p {
  font-size: 0.8em;
  line-height: 1.85;
  margin: 0 0 16px;
}
.s-paper-top {
  font-size: 0.6em;
  display: flex;
  justify-content: space-between;
  color: #65736b;
  letter-spacing: 0.08em;
}
.s-paper .s-paper-date {
  font-size: 0.65em;
  color: #68736f;
}
.s-document-field {
  border: 1px dashed #b18b41;
  border-radius: 6px;
  padding: 12px 16px;
  background: #fffbef;
  margin-top: 24px;
  scroll-margin: 30px;
}
.s-document-field > span {
  display: block;
  color: #86642b;
  font-size: 0.65em;
  margin-bottom: 3px;
}
.s-document-field > strong {
  font-size: 0.85em;
  font-weight: 500;
}
.s-paper-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e8ebe8;
  margin-top: 30px;
  padding-top: 12px;
  color: #778079;
  font-size: 0.55em;
  gap: 15px;
}
.s-consents {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}
.s-consents > label,
.s-confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding-block: 10px;
  font-size: 14px;
  line-height: 1.65;
  cursor: pointer;
}
.s-consents input,
.s-confirm-check input,
.s-choice input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--accent);
  margin-top: 2px;
}
.s-field-error {
  font-size: 13px;
  color: var(--danger);
  line-height: 1.5;
}
.s-reader:fullscreen,
.s-signature-shell:fullscreen {
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.s-reader:fullscreen .s-page-scroll {
  max-height: none;
  flex: 1;
}
.s-fullscreen-fallback {
  position: fixed !important;
  inset: 0;
  z-index: 1000;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.s-fullscreen-fallback .s-page-scroll {
  max-height: none;
  flex: 1;
}
.s-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px 24px;
}
.s-field {
  display: grid;
  gap: 8px;
  align-content: start;
}
.s-field label {
  font-size: 13px;
  font-weight: 600;
}
.s-field input,
.s-field select,
.s-code-panel input {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--text);
  min-height: 52px;
  width: 100%;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}
.s-field input:focus,
.s-field select:focus,
.s-code-panel input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.s-field small {
  font-size: 11px;
  line-height: 1.5;
}
.s-required {
  color: var(--accent);
}
.s-invalid input {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 5%, var(--surface));
}
.s-fieldset {
  border: 0;
  padding: 0;
  margin: 30px 0;
}
.s-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.6;
}
.s-fieldset legend small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 9px;
}
.s-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.s-choice {
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  min-height: 50px;
  box-sizing: border-box;
}
.s-choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--soft);
}
.s-switch-row {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
}
.s-switch-row strong {
  font-size: 14px;
  font-weight: 600;
}
.s-switch-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.s-switch-row input {
  appearance: none;
  width: 45px;
  height: 26px;
  flex-shrink: 0;
  background: var(--border);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.s-switch-row input:before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.s-switch-row input:checked {
  background: var(--accent);
}
.s-switch-row input:checked:before {
  transform: translateX(19px);
}
.s-required-note {
  font-size: 11px;
  margin-top: 18px;
}
.s-summary {
  margin: 30px 0;
  border-top: 1px solid var(--border);
}
.s-summary > div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  padding: 21px 0;
  line-height: 1.6;
}
.s-summary dt {
  color: var(--muted);
  font-size: 13px;
}
.s-summary dd {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.s-signature-shell {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  color: #173e36;
}
.s-signature-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 18px;
  color: #52675c;
}
.s-signature-toolbar > span {
  font-size: 13px;
}
.s-signature-toolbar > small {
  font-size: 11px;
}
.s-signature-toolbar .button {
  color: #173e36;
  background: transparent;
  border-color: transparent;
  font-size: 12px;
}
.s-canvas-wrap {
  height: 290px;
  position: relative;
}
.s-canvas-wrap canvas {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  z-index: 2;
  cursor: crosshair;
}
.s-signature-line {
  position: absolute;
  bottom: 55px;
  left: 8%;
  right: 8%;
  border-bottom: 1px solid #dce4df;
  pointer-events: none;
}
.s-signature-caption {
  position: absolute;
  bottom: 28px;
  left: 8%;
  font-size: 11px;
  color: #87958c;
  pointer-events: none;
}
.s-signature-shell:fullscreen .s-canvas-wrap,
.s-fullscreen-fallback .s-canvas-wrap {
  flex: 1;
  height: auto;
}
.s-signature-preview {
  background: #fff;
  color: #173e36;
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 260px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.s-signature-preview img {
  width: 100%;
  max-width: 550px;
  height: 220px;
  object-fit: contain;
}
.s-signature-preview > span {
  font-size: 13px;
  margin-top: 10px;
  color: #68776e;
}
.s-confirm-check {
  margin-top: 25px;
}
.s-status {
  text-align: center;
  max-width: 650px;
  margin: 44px auto 32px;
}
.s-status .screen-title {
  margin-top: 25px;
}
.s-status .lead {
  max-width: 520px;
  margin: 16px auto 28px;
}
.s-status-symbol {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  margin: auto;
  background: var(--soft);
  color: var(--accent);
  font-size: 35px;
  border-radius: 50%;
  font-weight: 400;
}
.s-status-warning {
  background: #fff2dc;
  color: #9b6b24;
}
.s-status-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}
.s-status-actions .button {
  min-width: 220px;
}
.s-loading-bar {
  height: 5px;
  border-radius: 10px;
  max-width: 240px;
  background: var(--border);
  overflow: hidden;
  margin: 28px auto;
}
.s-loading-bar > span {
  height: 100%;
  width: 40%;
  display: block;
  background: var(--accent);
  border-radius: 10px;
  animation: signing-progress 1.4s ease-in-out infinite;
}
.s-spinning {
  animation: signing-spin 2.5s linear infinite;
}
.s-completion-actions {
  text-align: center;
  margin-top: 32px;
}
.s-completion-actions > .muted {
  font-size: 12px;
  margin-top: 20px;
}
.s-person-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.s-person-card > div {
  flex: 1;
}
.s-person-card strong {
  font-size: 16px;
}
.s-person-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 7px 0 0;
}
.s-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 50%;
  color: var(--accent);
  font-size: 13px;
}
.s-partial-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 25px 0;
  border-bottom: 1px solid var(--border);
}
.s-partial-row strong {
  font-size: 15px;
}
.s-code-panel {
  max-width: 350px;
  margin: 30px auto 40px;
  text-align: center;
}
.s-code-panel > label {
  display: block;
  text-align: left;
  font-size: 13px;
  margin-bottom: 12px;
}
.s-code-panel input {
  text-align: center;
  letter-spacing: 10px;
  font-size: 28px;
  min-height: 72px;
  padding-left: 25px;
}
.s-code-panel p {
  font-size: 12px;
  line-height: 1.7;
}
.s-mobile-card {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 28px 0;
}
.s-qr {
  aspect-ratio: 1;
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  display: grid;
  place-items: center;
}
.s-qr img,
.s-qr svg {
  width: 100%;
  height: auto;
  display: block;
}
.s-mobile-card h2 {
  font-size: 22px;
  line-height: 1.4;
  margin: 12px 0;
}
.s-mobile-card p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.s-mobile-card .button {
  margin-top: 8px;
}
.s-service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.s-service {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  color: var(--text);
  cursor: pointer;
  position: relative;
  min-height: 228px;
  font: inherit;
}
.s-service.selected {
  border-color: var(--accent);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.s-service-icon {
  font-size: 25px;
  margin-bottom: 27px;
  color: var(--accent);
}
.s-service > strong {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.s-service > span:not(.s-service-icon):not(.s-selection) {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.s-selection {
  position: absolute;
  top: 22px;
  right: 20px;
  font-size: 18px;
  color: var(--accent);
}
.s-timeline {
  list-style: none;
  padding: 0;
  margin: 35px 0;
}
.s-timeline li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 32px;
}
.s-timeline li:before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 14px;
  border-left: 1px solid var(--border);
}
.s-timeline li:last-child:before {
  display: none;
}
.s-timeline-dot {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.s-timeline .current .s-timeline-dot {
  border: 7px solid var(--soft);
  background: var(--accent);
  box-sizing: border-box;
}
.s-timeline li > div {
  flex: 1;
}
.s-timeline strong {
  font-size: 14px;
}
.s-timeline p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 0;
}
.s-timeline time {
  font-size: 12px;
  color: var(--muted);
  padding-top: 5px;
}
.s-service:focus-visible,
.s-switch-row input:focus-visible,
.s-choice input:focus-visible,
.s-consents input:focus-visible,
.s-confirm-check input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
@keyframes signing-progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}
@keyframes signing-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 800px) {
  .s-reader-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .s-reader-actions {
    width: 100%;
  }
  .s-mobile-card {
    grid-template-columns: 190px 1fr;
    gap: 25px;
    padding: 24px;
  }
  .s-service-grid {
    grid-template-columns: 1fr;
  }
  .s-service {
    min-height: 130px;
    padding-left: 80px;
  }
  .s-service-icon {
    position: absolute;
    left: 25px;
    top: 25px;
  }
  .s-service > strong {
    padding-right: 20px;
  }
  .s-service > span:not(.s-service-icon):not(.s-selection) {
    max-width: 90%;
  }
  .s-form-grid {
    gap: 22px 18px;
  }
}
@media (max-width: 540px) {
  .s-steps {
    gap: 16px;
    font-size: 10px;
    justify-content: space-between;
  }
  .s-steps li {
    gap: 6px;
  }
  .s-steps li > span {
    width: 23px;
    height: 23px;
  }
  .s-heading {
    margin: 24px 0;
  }
  .s-document-item {
    gap: 12px;
    flex-wrap: wrap;
  }
  .s-document-item strong {
    font-size: 15px;
  }
  .s-document-item p {
    font-size: 12px;
  }
  .s-file-icon {
    width: 38px;
    height: 50px;
    font-size: 23px;
  }
  .s-document-item > .s-tag {
    margin-left: 50px;
  }
  .s-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 10px;
  }
  .s-actions > .button {
    width: 100%;
    justify-content: center;
  }
  .s-reader-toolbar {
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px;
  }
  .s-reader-toolbar > .button {
    width: 100%;
  }
  .s-page-scroll {
    padding: 12px;
    max-height: 440px;
  }
  .s-paper {
    padding: 25px 22px;
    min-width: 260px;
  }
  .s-reader-title {
    font-size: 21px;
  }
  .s-reader-actions .button {
    font-size: 11px;
    padding-inline: 10px;
    flex: 1;
  }
  .s-form-grid {
    grid-template-columns: 1fr;
  }
  .s-fieldset legend small {
    display: block;
    margin: 4px 0 0;
  }
  .s-choice-row {
    flex-direction: column;
  }
  .s-summary > div {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 17px 0;
  }
  .s-canvas-wrap {
    height: 260px;
  }
  .s-signature-toolbar {
    padding: 12px;
    gap: 10px;
  }
  .s-signature-toolbar > small {
    max-width: 65%;
    line-height: 1.6;
  }
  .s-signature-toolbar > span {
    font-size: 12px;
  }
  .s-status {
    margin-top: 32px;
  }
  .s-mobile-card {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 24px;
  }
  .s-qr {
    width: 200px;
    max-width: 100%;
    margin: auto;
  }
  .s-person-card {
    flex-wrap: wrap;
  }
  .s-person-card > .s-tag {
    margin-left: 64px;
  }
  .s-partial-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .s-note {
    padding: 15px;
    font-size: 12px;
  }
  .s-timeline li {
    gap: 12px;
  }
  .s-timeline time {
    font-size: 10px;
  }
  .s-signature-preview {
    padding: 15px;
    min-height: 220px;
  }
  .s-signature-preview img {
    height: 170px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .s-spinning,
  .s-loading-bar > span {
    animation: none;
  }
  .s-progress > span {
    transition: none;
  }
  .s-page-scroll {
    scroll-behavior: auto;
  }
}

/* PDF pages and their associated editable fields share a single zoom scale. */
.s-pdf-page {
  margin: 0 auto;
  background: #fff;
  color: #26332f;
  box-shadow: 0 3px 18px #172e3310;
  border: 1px solid #e3e7e2;
}
.s-pdf-image {
  display: block;
  width: 100%;
  height: auto;
}
.s-pdf-fields {
  display: grid;
  gap: 0.6em;
  border-top: 1px solid #d8e2dc;
  padding: 1.6em 2em;
  background: #fafcf9;
  font-size: inherit;
}
.s-pdf-fields > p {
  margin: 0 0 0.4em;
  font-size: 0.85em;
  font-weight: 600;
}
.s-pdf-fields label {
  font-size: 0.8em;
}
.s-pdf-fields label > span {
  color: #9b6b24;
}
.s-pdf-fields input {
  width: 100%;
  border: 1px solid #b18b41;
  border-radius: 0.3em;
  padding: 0.7em 0.8em;
  font: inherit;
  font-size: 0.9em;
  background: #fffbef;
  color: #26332f;
}
.s-pdf-fields input:focus {
  outline: 2px solid #275d4b;
  outline-offset: 3px;
}
.s-pdf-fields small {
  font-size: 0.65em;
  color: #52675c;
  margin-top: 0.7em;
}
.s-field-status {
  padding: 0 20px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  line-height: 1.6;
}
.s-field-status:not(:empty) {
  padding: 15px 20px;
  border-top: 1px solid var(--border);
}
.s-representation {
  display: grid;
  gap: 7px;
  margin: 20px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.s-representation strong {
  font-size: 14px;
}
.s-representation span {
  color: var(--muted);
}
.s-ui-fullscreen {
  position: fixed !important;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 0 !important;
}
.s-ui-fullscreen .s-page-scroll {
  max-height: none;
  flex: 1;
}
.s-ui-fullscreen .s-canvas-wrap {
  height: auto;
  flex: 1;
}
.s-pdf-text {
  background: var(--surface);
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.s-pdf-text summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 13px;
}
.s-pdf-text summary::before {
  content: "+";
  margin-right: 12px;
}
.s-pdf-text[open] summary::before {
  content: "−";
}
.s-pdf-text p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
  max-width: 75ch;
}
.s-pdf-text summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.s-pdf-text[open] {
  max-height: 35vh;
  overflow: auto;
}
.s-alternate {display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.s-document-item>div,.s-person-card>div,.s-signature-toolbar>span {min-width:0;overflow-wrap:anywhere}

/* Exact documents received from the local administration workspace. */
.l-doc-row{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:14px 0}.l-document-page{position:relative;min-width:0;max-width:none;margin:auto;background:white;color:#1b2924;box-shadow:0 4px 30px #0001}.l-document-page .s-pdf-image{display:block;width:100%;height:auto}.l-doc-frame{display:block;width:100%;height:880px;border:0;background:white}.l-doc-text{white-space:pre-wrap;overflow-wrap:anywhere;padding:24px}.l-field-marker{position:absolute;box-sizing:border-box;padding:3px 5px;background:#e7efebd9;border:1px dashed #49695a;color:#183c2c;font-size:12px;overflow-wrap:anywhere;pointer-events:none}.l-field{margin:16px 0}.l-checkbox{display:flex;align-items:center;gap:12px}.l-checkbox input{width:24px;height:24px}.l-field-placeholder{padding:12px;background:var(--soft);border-radius:8px;margin:8px 0}.l-history{list-style:none;padding:0}.l-history li{display:flex;gap:24px;padding:20px 0;border-bottom:1px solid var(--border)}#l-fields>.card{margin:20px 0}.s-page-scroll{min-height:0}#l-qr img{max-width:100%;height:auto}
.l-field-marker{font-size:.75em;padding:.25em .4em}

/* Fit the received page at 100%; zoom expands inside its scroll region. */
.l-page-scroll { container-type: inline-size; }
.l-document-page {
  width: min(calc(100% * var(--l-zoom, 1)), calc(620px * var(--l-zoom, 1)));
  font-size: calc(min(16px, 2.580645cqw) * var(--l-zoom, 1));
}
.l-reader-toolbar { flex-wrap: wrap; gap: 8px; }
.l-reader-toolbar .row { flex-wrap: nowrap; }
.l-reader-toolbar .button { width: auto; flex: 0 0 auto; }
.l-reader-toolbar .l-reader-tools { margin-left: auto; }
@media (max-width: 600px) {
  .l-reader-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    padding: 8px;
  }
  .l-reader-toolbar .l-page-controls { justify-content: flex-start; }
  .l-reader-toolbar .l-zoom-controls { justify-content: flex-end; }
  .l-reader-toolbar .row span { min-width: 38px; }
  .l-reader-toolbar .button { min-width: 44px; min-height: 48px; padding: 6px 8px; }
  .l-reader-toolbar .l-reader-tools {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 6px;
    margin: 0;
  }
  .l-reader-toolbar .l-reader-tools .button { min-width: 0; width: 100%; padding: 6px; line-height: 1.2; }
}

.l-doc-row > .button{flex-shrink:0;white-space:nowrap}
.l-doc-row > div{min-width:0}
