.dossier-document,
.dossier-document body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden !important;
}

body.dossier-page {
  min-height: 100svh;
  background: #060606 url('/assets/images/page-bg/dossier-connection-chart-hybrid-20260825.webp') center / cover fixed no-repeat;
  color: #f2fff9;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.dossier-shell {
  width: min(1760px, calc(100% - 20px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 46px 0 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.dossier-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 0 0 auto;
  min-height: 64px;
  margin-bottom: 4px;
  padding: 10px 14px;
  background:
    linear-gradient(135deg, rgba(9, 12, 10, 0.82), rgba(0, 0, 0, 0.5)),
    linear-gradient(90deg, rgba(216, 179, 95, 0.08), rgba(0, 255, 136, 0.06));
  border: 1px solid rgba(216, 179, 95, 0.22);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 245, 204, 0.08);
  box-sizing: border-box;
}

.dossier-title {
  min-width: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #d8b35f;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dossier-title h1 {
  margin: 0;
  color: yellow;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.3vw, 2.8rem);
  font-weight: 700;
  line-height: 0.98;
  overflow-wrap: anywhere;
  letter-spacing: 0;
  -webkit-text-stroke: 1px black;
  text-stroke: 1px black;
  text-shadow: 0 2px 0 #000, 0 12px 34px rgba(0, 0, 0, 0.68);
}

.dossier-selector {
  position: relative;
  display: grid;
  gap: 6px;
  width: min(360px, 40vw);
  min-width: 260px;
  padding: 8px 10px 10px;
  border: 1px solid rgba(0, 255, 136, 0.28);
  background:
    linear-gradient(180deg, rgba(3, 8, 7, 0.88), rgba(0, 0, 0, 0.7)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.dossier-selector::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(216, 179, 95, 0.16);
  pointer-events: none;
}

.dossier-selector::after {
  content: '';
  position: absolute;
  right: 24px;
  bottom: 23px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #09120f;
  border-bottom: 2px solid #09120f;
  pointer-events: none;
  transform: rotate(45deg);
}

.dossier-selector label {
  position: relative;
  z-index: 1;
  color: #f3cf70;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.dossier-selector select {
  position: relative;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 7px 38px 7px 12px;
  border: 1px solid rgba(216, 179, 95, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(223, 217, 199, 0.96));
  color: #11150f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 3px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.dossier-selector select:hover {
  border-color: rgba(243, 207, 112, 0.82);
}

.dossier-selector select:focus-visible {
  border-color: #00ff88;
  outline: 2px solid rgba(0, 255, 136, 0.38);
  outline-offset: 2px;
}

.dossier-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 0;
  overflow: hidden;
}

body.dossier-inspection-open {
  cursor: default;
}

.dossier-book {
  margin: 0 auto;
  opacity: 1;
  visibility: visible;
}

.dossier-book.is-ready {
  opacity: 1;
  visibility: visible;
}

.dossier-image-inspector {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 44px);
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.dossier-image-inspector.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dossier-inspection-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72) 72%),
    rgba(8, 7, 5, 0.52);
  cursor: zoom-out;
}

.dossier-inspection-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(1120px, 96vw);
  max-height: min(880px, 92vh);
  perspective: 1400px;
}

.dossier-inspection-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: min(100%, 1040px);
  max-height: min(88vh, 860px);
  margin: 0;
  padding: clamp(10px, 1.4vw, 18px);
  border: 1px solid rgba(70, 48, 23, 0.44);
  background:
    linear-gradient(135deg, rgba(255, 250, 231, 0.98), rgba(231, 210, 158, 0.96)),
    url('/assets/images/paper02.jpg') center / cover no-repeat;
  box-shadow:
    0 42px 72px rgba(0, 0, 0, 0.58),
    0 8px 20px rgba(0, 0, 0, 0.32);
  box-sizing: border-box;
  color: #19140b;
  transform: rotateX(3deg) rotateZ(-1.2deg) translateY(14px) scale(0.94);
  opacity: 0;
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.24, 1),
    opacity 0.18s ease;
}

.dossier-image-inspector.is-open .dossier-inspection-card {
  transform: rotateX(0deg) rotateZ(-1.2deg) translateY(0) scale(1);
  opacity: 1;
}

.dossier-inspection-image {
  display: block;
  align-self: center;
  justify-self: center;
  max-width: 100%;
  max-height: min(70vh, 690px);
  object-fit: contain;
  background: rgba(16, 14, 10, 0.08);
  box-shadow: inset 0 0 0 1px rgba(40, 28, 16, 0.18);
}

.dossier-inspection-caption {
  max-width: 920px;
  margin: 0 auto;
  color: #19140b;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.74rem, 1.1vw, 0.95rem);
  line-height: 1.32;
  text-align: center;
  overflow-wrap: anywhere;
}

.dossier-inspection-caption strong {
  display: block;
  margin-bottom: 4px;
  color: #5d160e;
  font-size: 0.92em;
  text-transform: uppercase;
}

.dossier-inspection-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(92, 11, 11, 0.46);
  background: rgba(246, 233, 194, 0.92);
  color: #5d160e;
  font-weight: 800;
  cursor: pointer;
}

.dossier-inspection-close:hover,
.dossier-inspection-close:focus-visible {
  background: #fff6d9;
  outline: 2px solid rgba(92, 11, 11, 0.4);
  outline-offset: 2px;
}

.dossier-inspection-hand {
  position: absolute;
  z-index: 1;
  left: clamp(-18px, 4.8vw, 82px);
  bottom: clamp(-172px, -10vw, -96px);
  width: clamp(260px, 29vw, 430px);
  aspect-ratio: 0.74;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.38));
  pointer-events: none;
  transform: translate(-14px, 18px) rotate(6deg) scale(0.98);
  transform-origin: 72% 22%;
  opacity: 0;
  transition:
    opacity 0.14s ease 0.08s,
    transform 0.2s cubic-bezier(0.2, 0.8, 0.24, 1) 0.08s;
}

.dossier-image-inspector.is-open .dossier-inspection-hand {
  opacity: 1;
  transform: translate(0, 0) rotate(4deg) scale(1);
}

.dossier-image-inspector.is-landscape-preview .dossier-inspection-hand {
  left: clamp(42px, 9vw, 138px);
  bottom: clamp(-122px, -7vw, -74px);
  width: clamp(246px, 25vw, 368px);
  transform-origin: 70% 28%;
}

.dossier-image-inspector.is-open.is-landscape-preview .dossier-inspection-hand {
  transform: translate(0, 0) rotate(7deg) scale(1);
}

.dossier-inspection-hand.is-male {
  background-image: url('/assets/images/dossier/inspection-hand-male-cutout-left.webp');
}

.dossier-inspection-hand.is-female {
  background-image: url('/assets/images/dossier/inspection-hand-female-cutout.webp');
}

.dossier-inspection-grip {
  position: absolute;
  z-index: 3;
  display: none;
  left: clamp(74px, 8.6vw, 128px);
  bottom: clamp(-20px, 0.4vw, 6px);
  width: clamp(164px, 16vw, 236px);
  aspect-ratio: 1.52;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.26));
  pointer-events: none;
  opacity: 0;
  transform: translate(-8px, 12px) rotate(6deg) scale(0.98);
  transform-origin: 72% 78%;
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
  transition:
    opacity 0.14s ease 0.08s,
    transform 0.2s cubic-bezier(0.2, 0.8, 0.24, 1) 0.08s;
}

.dossier-image-inspector.is-landscape-preview .dossier-inspection-grip {
  display: block;
}

.dossier-image-inspector.is-open.is-landscape-preview .dossier-inspection-grip {
  opacity: 1;
  transform: translate(0, 0) rotate(4deg) scale(1);
}

.dossier-inspection-grip.is-male {
  background-image: url('/assets/images/dossier/inspection-hand-male-grip.webp');
}

.dossier-inspection-grip.is-female {
  background-image: url('/assets/images/dossier/inspection-hand-female-grip.webp');
}

.page {
  --dossier-paper-inset-x: clamp(12px, 3.6%, 24px);
  --dossier-paper-inset-y: clamp(14px, 2.8%, 28px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(70, 42, 13, 0.34), rgba(70, 42, 13, 0.05) 7%, transparent 18%, transparent 82%, rgba(70, 42, 13, 0.08) 93%, rgba(70, 42, 13, 0.3)),
    radial-gradient(ellipse at 12% 18%, rgba(244, 214, 139, 0.4), transparent 42%),
    radial-gradient(ellipse at 78% 86%, rgba(78, 47, 16, 0.28), transparent 54%),
    repeating-linear-gradient(0deg, rgba(82, 50, 18, 0.04) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(255, 239, 174, 0.035) 0 1px, transparent 1px 11px),
    #b99052;
  color: #10100d;
  font-family: 'Courier New', Courier, monospace;
  box-sizing: border-box;
  border: 0;
  box-shadow: none;
}

.page::before,
.page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(73, 48, 17, 0.12), transparent 11%, transparent 91%, rgba(74, 47, 15, 0.08)),
    linear-gradient(180deg, rgba(255, 252, 231, 0.12), transparent 24%, transparent 78%, rgba(80, 46, 13, 0.08)),
    url('/assets/images/dossier/dossier-paper-internal-realistic-v4.webp') center / cover no-repeat,
    #efe3c0;
  opacity: 1;
  box-shadow:
    inset 0 0 0 1px rgba(60, 39, 14, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.24);
}

.page::after {
  z-index: 1;
  background: linear-gradient(90deg, rgba(55, 34, 12, 0.05), transparent 14%, transparent 86%, rgba(55, 34, 12, 0.05));
  opacity: 0.42;
  mix-blend-mode: multiply;
}

.page:not(.page-cover):not(.page-back-cover)::before,
.page:not(.page-cover):not(.page-back-cover)::after {
  inset: var(--dossier-paper-inset-y) var(--dossier-paper-inset-x);
}

.page:not(.page-cover):not(.page-back-cover) {
  -webkit-mask-image: url('/assets/images/dossier/dossier-folder-cover-realistic-v5.webp?v=2');
  mask-image: url('/assets/images/dossier/dossier-folder-cover-realistic-v5.webp?v=2');
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-size: cover;
}

.page:not(.page-cover):not(.page-back-cover) .content {
  width: calc(100% - (var(--dossier-paper-inset-x) * 2));
  height: calc(100% - (var(--dossier-paper-inset-y) * 2));
  max-height: calc(100% - (var(--dossier-paper-inset-y) * 2));
  margin: var(--dossier-paper-inset-y) var(--dossier-paper-inset-x);
}

.page-cover {
  background-color: transparent;
  background-image: url('/assets/images/dossier/dossier-folder-cover-realistic-v5.webp?v=2');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.26));
}

.page-cover::before,
.page-cover::after {
  display: none;
}

.page-back-cover {
  background: transparent url('/assets/images/dossier/dossier-folder-back-realistic-v5.webp?v=2') center / cover no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.26));
}

.page-back-cover::before,
.page-back-cover::after {
  display: none;
}

.cover-tab,
.cover-classification,
.cover-stamp,
.cover-docket,
.cover-subject,
.cover-file-lines,
.back-cover-tab,
.back-cover-label,
.back-cover-lines,
.back-cover-warning,
.back-cover-stamp {
  position: absolute;
  z-index: 3;
  font-family: 'Courier New', Courier, monospace;
  color: #17110a;
}

.cover-tab {
  top: 2.6%;
  right: 8%;
  left: auto;
  width: 36%;
  padding: 0.38rem 0.52rem;
  border: 1px solid rgba(69, 43, 17, 0.42);
  background: rgba(241, 222, 171, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 223, 0.38),
    0 2px 4px rgba(45, 27, 9, 0.12);
  font-size: clamp(0.52rem, 0.76vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.cover-classification {
  top: 19%;
  left: 12%;
  max-width: 52%;
  padding: 0.34rem 0.58rem 0.28rem;
  border: 3px double rgba(96, 10, 10, 0.58);
  color: rgba(96, 10, 10, 0.86);
  font-size: clamp(0.96rem, 1.9vw, 2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-5deg);
  text-shadow:
    0 1px 0 rgba(255, 223, 168, 0.28),
    0 2px 0 rgba(37, 18, 8, 0.16);
}

.cover-stamp {
  top: 28%;
  right: 13%;
  padding: 0.26rem 0.45rem;
  border: 2px solid rgba(91, 9, 9, 0.46);
  color: rgba(91, 9, 9, 0.68);
  font-size: clamp(0.54rem, 0.8vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(7deg);
}

.cover-docket {
  left: 13%;
  bottom: 27%;
  width: 58%;
  padding: 0.74rem 0.82rem;
  border: 1px solid rgba(54, 35, 14, 0.48);
  background:
    linear-gradient(180deg, rgba(248, 236, 199, 0.76), rgba(226, 198, 136, 0.66)),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(68, 42, 17, 0.12) 18px 19px);
  box-shadow:
    0 5px 10px rgba(38, 22, 8, 0.16),
    inset 0 1px 0 rgba(255, 250, 226, 0.44);
}

.cover-docket span,
.back-cover-label span {
  display: block;
  margin-bottom: 0.34rem;
  color: rgba(31, 20, 11, 0.74);
  font-size: clamp(0.62rem, 0.85vw, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cover-docket strong,
.back-cover-label strong {
  display: block;
  color: #17110a;
  font-size: clamp(1rem, 1.7vw, 1.62rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.cover-file-lines {
  left: 13%;
  bottom: 11%;
  width: 64%;
  height: 9%;
  border-top: 1px solid rgba(47, 29, 11, 0.22);
  border-bottom: 1px solid rgba(47, 29, 11, 0.14);
  background: repeating-linear-gradient(0deg, transparent 0 15px, rgba(47, 29, 11, 0.2) 15px 16px);
  opacity: 0.55;
}

.back-cover-tab {
  top: 5%;
  right: 10%;
  padding: 0.34rem 0.58rem;
  border: 1px solid rgba(59, 36, 13, 0.48);
  background: rgba(241, 222, 171, 0.52);
  color: rgba(31, 20, 10, 0.74);
  font-size: clamp(0.54rem, 0.78vw, 0.68rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.back-cover-label {
  left: 15%;
  top: 28%;
  width: 56%;
  padding: 0.78rem 0.88rem;
  border: 1px solid rgba(57, 35, 13, 0.46);
  background: rgba(242, 222, 171, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 246, 214, 0.22);
}

.back-cover-lines {
  left: 15%;
  top: 47%;
  width: 62%;
  height: 20%;
  background: repeating-linear-gradient(0deg, transparent 0 18px, rgba(57, 35, 13, 0.18) 18px 19px);
  opacity: 0.48;
}

.back-cover-warning {
  left: 15%;
  bottom: 12%;
  color: rgba(31, 20, 10, 0.7);
  font-size: clamp(0.54rem, 0.76vw, 0.7rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-cover-stamp {
  position: absolute;
  right: 14%;
  bottom: 18%;
  padding: 0.34rem 0.58rem;
  border: 2px solid rgba(92, 11, 11, 0.58);
  color: rgba(92, 11, 11, 0.72);
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.58rem, 0.88vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-8deg);
}

.cover-subject {
  right: 13%;
  bottom: 15%;
  max-width: 58%;
  color: rgba(20, 14, 8, 0.88);
  font-size: clamp(0.64rem, 0.9vw, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: right;
  text-transform: uppercase;
}

.content {
  position: relative;
  z-index: 3;
  height: 100%;
  padding: clamp(20px, 6%, 48px);
  box-sizing: border-box;
  overflow: hidden;
  font-size: var(--page-font-size, 10px);
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.content h1,
.content h2 {
  margin-top: 0;
  margin-bottom: 0.38rem;
  color: #12100a;
  font-size: 1.12em;
  line-height: 1.12;
  text-transform: uppercase;
}

.content h1 {
  font-size: 1.24em;
}

.content h3,
.content h4,
.content h5,
.content h6 {
  margin: 0 0 0.32rem;
  color: #12100a;
  font-size: 1em;
  line-height: 1.15;
}

.content p {
  margin: 0 0 0.34rem;
}

.content blockquote {
  margin: 0 0 0.46rem;
  padding: 0.18rem 0 0.18rem 0.52rem;
  border-left: 2px solid rgba(72, 45, 20, 0.42);
}

.content blockquote > :last-child {
  margin-bottom: 0;
}

.content ul,
.content ol {
  margin: 0 0 0.38rem 1rem;
  padding: 0;
}

.content li {
  margin: 0 0 0.16rem;
}

.content strong,
.content b {
  font-weight: 700;
}

.content figure {
  display: block;
  max-width: 100%;
  margin: 0 0 0.5rem;
  page-break-inside: avoid;
  break-inside: avoid;
}

.content figure img {
  display: block;
  margin: 0 auto;
}

.content .dossier-image-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

.content .dossier-image-link:focus-visible {
  outline: 2px solid rgba(104, 72, 24, 0.72);
  outline-offset: 3px;
}

.content .dossier-image-link:hover img,
.content .dossier-image-link:focus-visible img {
  filter: contrast(1.04);
}

.content figcaption {
  max-width: 100%;
  margin: 0.18rem 0 0;
  font-size: 0.88em;
  line-height: 1.22;
  text-align: center;
  overflow-wrap: anywhere;
}

.content img {
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
}

.content img:not(.dossier-passport-photo),
.content picture,
.content video,
.content canvas,
.content svg {
  max-height: calc(var(--paper-content-height, 520px) * 0.56);
}

.content .dossier-passport-exhibit {
  width: min(35mm, 45%);
  max-width: 35mm;
  margin-right: auto;
  margin-left: auto;
}

.content .dossier-passport-exhibit .dossier-image-link {
  width: 100%;
}

.content img.dossier-passport-photo {
  display: block;
  width: min(35mm, 45%) !important;
  max-width: 35mm !important;
  height: 45mm !important;
  max-height: 45mm !important;
  margin-right: auto;
  margin-left: auto;
  object-fit: cover;
}

.content .dossier-passport-exhibit img.dossier-passport-photo {
  width: 100% !important;
}

.content .dossier-surveillance-exhibit,
.content .dossier-evidence-photo {
  max-width: 100%;
}

.content .dossier-surveillance-exhibit .dossier-image-link {
  width: fit-content;
}

.content .dossier-surveillance-exhibit img,
.content img.dossier-evidence-photo {
  width: auto;
  max-height: calc(var(--paper-content-height, 520px) * 0.62);
}

.content table {
  width: 100% !important;
  max-width: 100%;
  margin: 0 0 0.46rem;
  border-collapse: collapse;
  table-layout: fixed;
  overflow-wrap: anywhere;
}

.content th,
.content td {
  padding: 0.16rem 0.22rem;
  border: 1px solid rgba(42, 30, 15, 0.32);
  vertical-align: top;
}

.content .dossier-table-fragment {
  margin-bottom: 0.32rem;
}

.content .dossier-fit-block {
  max-width: 100%;
  max-height: 100%;
  transform-origin: top left;
}

.content figure.dossier-fit-block {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.content figure.dossier-fit-block img,
.content .dossier-fit-block img:not(.dossier-passport-photo) {
  max-height: calc(var(--paper-content-height, 520px) * 0.78);
}

.content .dossier-scroll-fallback {
  max-height: 100%;
  overflow: auto;
}

.pagination-measure {
  position: fixed;
  left: -10000px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  contain: layout style paint;
}

.flap {
  position: absolute;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 20;
  pointer-events: none;
}

.top-left {
  top: 0;
  left: 0;
}

.top-right {
  top: 0;
  right: 0;
}

.dossier-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex: 0 0 auto;
  min-height: 42px;
  margin-top: 6px;
}

.dossier-nav button {
  min-width: 140px;
  padding: 8px 14px;
  border: 1px solid rgba(216, 179, 95, 0.55);
  background: rgba(0, 0, 0, 0.72);
  color: #d8b35f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.dossier-nav button:hover,
.dossier-nav button:focus {
  background: rgba(216, 179, 95, 0.14);
  color: #ffffff;
}

#dossier-page-status {
  min-width: 112px;
  color: #e9fff6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.8rem;
  text-align: center;
}

.dossier-footer {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: rgba(0, 0, 0, 0.7);
  color: #cffff0;
  box-sizing: border-box;
  font-size: 0.72rem;
}

.dossier-footer div,
.dossier-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.dossier-footer a {
  color: #d8b35f;
  font-weight: 800;
  text-decoration: none;
}

.dossier-footer a:hover,
.dossier-footer a:focus {
  color: #ffffff;
}

@media screen and (max-width: 900px) {
  .dossier-shell {
    width: min(100% - 20px, 760px);
    padding-top: 58px;
  }

  .dossier-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .dossier-selector {
    width: 100%;
    min-width: 0;
  }

  .dossier-nav {
    flex-wrap: wrap;
  }

  .dossier-nav button {
    min-width: 128px;
  }

  .dossier-footer {
    flex-direction: column;
    width: min(100% - 20px, 760px);
    gap: 6px;
    text-align: center;
  }

  .dossier-footer div,
  .dossier-footer nav {
    justify-content: center;
  }
}

@media screen and (max-width: 700px) {
  body.dossier-page {
    background-attachment: scroll;
  }

  body.is-dossier-mobile-stack {
    min-height: 100%;
  }

  .dossier-shell {
    width: calc(100vw - 16px);
    max-width: 560px;
    min-width: 0;
    min-height: auto;
    padding: 78px 0 28px;
  }

  .dossier-toolbar {
    margin-bottom: 14px;
    padding: 10px;
  }

  .dossier-selector select {
    min-height: 44px;
    font-size: 1rem;
  }

  .dossier-stage {
    display: block;
    min-width: 0;
    overflow: visible;
    padding: 0;
  }

  .dossier-book.is-mobile-stack {
    display: grid;
    gap: 16px;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    height: auto !important;
    margin: 0 auto;
    opacity: 1;
    visibility: visible;
  }

  .dossier-book.is-mobile-stack .page {
    position: relative !important;
    display: block !important;
    inset: auto !important;
    --dossier-paper-inset-x: clamp(10px, 3.2vw, 18px);
    --dossier-paper-inset-y: clamp(10px, 2.6vw, 18px);
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    height: auto !important;
    min-height: auto;
    margin: 0;
    overflow: visible;
    transform: none !important;
    box-shadow: none;
  }

  .dossier-book.is-mobile-stack .page-cover,
  .dossier-book.is-mobile-stack .page-back-cover {
    aspect-ratio: 210 / 297;
    overflow: hidden;
  }

  .dossier-book.is-mobile-stack .generated-page:not(.page-back-cover),
  .dossier-book.is-mobile-stack .page:not(.page-cover):not(.page-back-cover) {
    min-height: auto;
  }

  .dossier-book.is-mobile-stack .content {
    height: auto !important;
    max-height: none !important;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: visible;
    padding: clamp(24px, 7vw, 34px);
    font-size: clamp(1rem, 4.15vw, 1.16rem);
    line-height: 1.55;
    letter-spacing: 0;
  }

  .dossier-book.is-mobile-stack .content h1 {
    font-size: 1.28em;
  }

  .dossier-book.is-mobile-stack .content h2 {
    font-size: 1.18em;
  }

  .dossier-book.is-mobile-stack .content h1,
  .dossier-book.is-mobile-stack .content h2,
  .dossier-book.is-mobile-stack .content h3,
  .dossier-book.is-mobile-stack .content h4,
  .dossier-book.is-mobile-stack .content h5,
  .dossier-book.is-mobile-stack .content h6 {
    margin-bottom: 0.58rem;
    line-height: 1.18;
  }

  .dossier-book.is-mobile-stack .content p,
  .dossier-book.is-mobile-stack .content ul,
  .dossier-book.is-mobile-stack .content ol,
  .dossier-book.is-mobile-stack .content blockquote,
  .dossier-book.is-mobile-stack .content figure,
  .dossier-book.is-mobile-stack .content table {
    margin-bottom: 0.82rem;
  }

  .dossier-book.is-mobile-stack .content img:not(.dossier-passport-photo),
  .dossier-book.is-mobile-stack .content picture,
  .dossier-book.is-mobile-stack .content video,
  .dossier-book.is-mobile-stack .content canvas,
  .dossier-book.is-mobile-stack .content svg {
    width: 100%;
    max-height: none;
  }

  .dossier-book.is-mobile-stack .content .dossier-passport-exhibit {
    width: min(190px, 58vw);
    max-width: none;
  }

  .dossier-book.is-mobile-stack .content img.dossier-passport-photo {
    width: min(150px, 44vw) !important;
    max-width: 150px !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 35 / 45;
    object-fit: cover;
  }

  .dossier-book.is-mobile-stack .content .dossier-surveillance-exhibit img,
  .dossier-book.is-mobile-stack .content img.dossier-evidence-photo {
    width: 100%;
    max-height: none;
  }

  .dossier-book.is-mobile-stack .content table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    table-layout: auto;
    font-size: 0.88em;
    -webkit-overflow-scrolling: touch;
  }

  .dossier-book.is-mobile-stack .content table > thead,
  .dossier-book.is-mobile-stack .content table > tbody,
  .dossier-book.is-mobile-stack .content table > tfoot {
    display: table;
    width: 100%;
    min-width: min(470px, 126vw);
  }

  .dossier-book.is-mobile-stack .content table tr {
    display: table-row;
  }

  .dossier-book.is-mobile-stack .content table th,
  .dossier-book.is-mobile-stack .content table td {
    display: table-cell;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .dossier-book.is-mobile-stack .content table th:first-child,
  .dossier-book.is-mobile-stack .content table td:first-child {
    width: 4.4rem;
    white-space: nowrap;
  }

  .dossier-book.is-mobile-stack .flap {
    display: none;
  }

  body.is-dossier-mobile-stack .dossier-nav {
    display: none;
  }

  body.is-dossier-mobile-stack .dossier-footer {
    margin-top: 22px;
  }

  .dossier-mobile-break {
    margin: 1.25rem 0;
    border: 0;
    border-top: 1px dashed rgba(70, 45, 18, 0.42);
  }

  .cover-tab {
    right: 7%;
    width: 42%;
    padding: 0.3rem 0.42rem;
    font-size: clamp(0.46rem, 1.7vw, 0.58rem);
  }

  .cover-classification {
    top: 18%;
    left: 11%;
    max-width: 58%;
    padding: 0.26rem 0.42rem 0.22rem;
    font-size: clamp(0.88rem, 4.4vw, 1.34rem);
    letter-spacing: 0;
    transform: rotate(-4deg);
    transform-origin: left center;
  }

  .cover-stamp {
    top: 27%;
    right: 12%;
    padding: 0.2rem 0.34rem;
    font-size: clamp(0.48rem, 2vw, 0.62rem);
  }

  .cover-docket {
    left: 12%;
    width: 62%;
    padding: 0.62rem;
  }

  .cover-subject {
    display: none;
  }

  .back-cover-label {
    width: 62%;
    padding: 0.66rem;
  }

  .back-cover-stamp {
    right: 12%;
    font-size: clamp(0.52rem, 2vw, 0.66rem);
  }
}

@media screen and (max-width: 520px) {
  .dossier-title h1 {
    font-size: 1.55rem;
  }

  .content {
    padding: 22px;
  }

  .flap {
    width: 52px;
    height: 52px;
  }

  .dossier-inspection-hand {
    left: clamp(-118px, -24vw, -64px);
    bottom: clamp(-184px, -28vw, -136px);
    width: clamp(230px, 76vw, 310px);
  }

  .dossier-image-inspector.is-landscape-preview .dossier-inspection-hand {
    left: clamp(-58px, -12vw, -22px);
    bottom: clamp(-104px, -18vw, -78px);
    width: clamp(208px, 62vw, 270px);
  }

  .dossier-inspection-grip {
    left: clamp(-78px, -18vw, -42px);
    bottom: clamp(-76px, -13vw, -46px);
    width: clamp(124px, 38vw, 156px);
  }
}
