:root {
  color-scheme: light;
  --paper: #ffffff;
  --base: #edf3f6;
  --layer: #f5f8fa;
  --line: #d4dfe5;
  --ink: #142b3c;
  --muted: #506877;
  --navy: #162c3d;
  --navy-text: #f4f9fd;
  --teal: #076773;
  --teal-deep: #075661;
  --teal-soft: #e4f2f3;
  --teal-line: #a7cfd1;
  --focus: #07758a;
  --shadow: 0 2px 3px rgb(19 43 58 / 5%), 0 10px 24px rgb(19 43 58 / 5%);
  --radius: 12px;
  --page-width: 100%;
  font-family: system-ui, "Microsoft JhengHei UI", "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 280px;
  margin: 0;
  background: var(--base);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, dl { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
a { color: var(--teal-deep); text-underline-offset: .18em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .49; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.topbar {
  min-width: 0;
  background: var(--navy);
  color: var(--navy-text);
  box-shadow: 0 1px 0 rgb(12 29 42 / 20%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 1500px);
  min-height: 4.25rem;
  margin-inline: auto;
  padding: .6rem clamp(.9rem, 3vw, 2.25rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: none;
  width: clamp(7.6rem, 11vw, 9.6rem);
  height: auto;
  object-fit: contain;
}

.brand-copy { min-width: 0; line-height: 1.2; }
.brand-copy strong { color: var(--navy-text); font-size: 1.07rem; font-weight: 750; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; min-width: 0; }
.top-actions > :not(.btn) { color: #c6d8e2; font-size: .87rem; }
.topbar :focus-visible { outline-color: #8be2dc; }
.topbar .btn-subtle { background: #284355; border-color: #5a7483; color: var(--navy-text); }
.topbar .btn-subtle:hover { background: #345268; color: #ffffff; }

.shell {
  width: min(100%, 1500px);
  margin-inline: auto;
  padding: 1.15rem clamp(.9rem, 3vw, 2.25rem) 1.75rem;
}
.shell, .shell > * { min-width: 0; }

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  margin-bottom: .75rem;
  color: var(--muted);
  font-size: .86rem;
}
.breadcrumbs a { font-weight: 650; }
.breadcrumbs > [aria-current] { font-weight: 650; color: var(--ink); }
.breadcrumbs button {
  min-height: 2rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal-deep);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.library-heading {
  max-width: 60rem;
  margin-block: clamp(1.25rem, 3.6vw, 3.25rem) clamp(1.3rem, 3.1vw, 2.5rem);
}

.eyebrow {
  margin-bottom: .5rem;
  color: var(--teal-deep);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .045em;
}

.library-heading h1 {
  font-size: clamp(1.9rem, 4.1vw, 3.15rem);
  font-weight: 790;
  letter-spacing: -.035em;
}
.library-heading p:not(.eyebrow) { margin-top: .55rem; color: var(--muted); }

.library-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(.8rem, 2vw, 1.5rem);
}

.industry-panel, .library-results, .document-rail, .preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.industry-panel { padding: 1.1rem .82rem .85rem; }
.industry-panel > h2, .industry-panel > h3 { margin: 0 .43rem .8rem; font-size: 1rem; font-weight: 750; }
.industry-nav { display: grid; gap: .3rem; }

.industry-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  min-height: 2.68rem;
  padding: .5rem .63rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-weight: 610;
  text-align: start;
  text-decoration: none;
}

.industry-button:hover { background: var(--layer); }
.industry-button[aria-pressed="true"], .industry-button[aria-current] {
  background: var(--teal-soft);
  border-color: var(--teal-line);
  color: var(--teal-deep);
  font-weight: 750;
}

.industry-count {
  flex: none;
  min-width: 1.5rem;
  padding: .05rem .3rem;
  border-radius: 12px;
  background: var(--layer);
  color: var(--muted);
  text-align: center;
  font-size: .77rem;
  font-weight: 690;
  font-variant-numeric: tabular-nums;
}
.industry-button[aria-pressed="true"] .industry-count { color: var(--teal-deep); background: var(--paper); }

.customer-filter {
  display: grid;
  gap: .38rem;
  margin: .9rem .12rem 0;
  padding: .85rem .3rem .13rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 740;
}
.customer-filter select {
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  padding: .4rem .53rem;
  border: 1px solid #afc2cb;
  border-radius: 7px;
  background: var(--layer);
  color: var(--ink);
  font-weight: 450;
}
.customer-filter select:disabled { opacity: .62; }

.library-results { min-height: 17rem; padding: clamp(1rem, 2.6vw, 1.65rem); }
.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.25rem;
  margin-bottom: 1.2rem;
}
.library-toolbar h2 { font-size: clamp(1.25rem, 2.1vw, 1.65rem); font-weight: 750; }
.library-toolbar p { margin-top: .2rem; color: var(--muted); font-size: .88rem; }

.search-box { display: block; width: min(100%, 19rem); }
.search-box:is(input), .search-box input {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .56rem .75rem;
  border: 1px solid #afc2cb;
  border-radius: 7px;
  background: var(--layer);
  color: var(--ink);
}
.search-box input::placeholder, input.search-box::placeholder { color: var(--muted); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: .9rem;
}

.project-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: .7rem;
  min-width: 0;
  padding: 1rem 1.05rem .95rem;
  border: 1px solid var(--line);
  border-top: 3px solid #20808c;
  border-radius: 10px;
  background: var(--layer);
  color: var(--ink);
  text-align: start;
  text-decoration: none;
}
.project-card:is(a, button):hover { background: #eef7f8; border-inline-color: var(--teal-line); border-bottom-color: var(--teal-line); }
.project-card h2, .project-card h3 { overflow-wrap: anywhere; font-size: 1.27rem; font-weight: 760; }
.project-card p { color: var(--muted); }
.project-card-top, .project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem .65rem;
}
.project-code {
  color: var(--teal-deep);
  font: 700 .82rem/1.45 ui-monospace, Consolas, monospace;
  letter-spacing: .025em;
}
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .65rem; color: var(--muted); font-size: .89rem; }
.project-card-footer {
  margin-top: .2rem;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
  color: var(--teal-deep);
  font-size: .92rem;
  font-weight: 680;
}

.empty-state {
  width: 100%;
  min-height: 8rem;
  padding: 1.2rem;
  display: grid;
  align-content: center;
  gap: .3rem;
  border: 1px dashed #afc2cb;
  border-radius: 9px;
  background: var(--layer);
  color: var(--muted);
}
.empty-state h2, .empty-state h3, .empty-state strong { color: var(--ink); }

.project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem 1.4rem;
  margin-bottom: 1rem;
}
.project-head-main { min-width: 0; }
.project-head-main h1, .project-heading > h1 {
  margin-block: .15rem .32rem;
  overflow-wrap: anywhere;
  font-size: clamp(1.65rem, 3.15vw, 2.65rem);
  font-weight: 790;
  letter-spacing: -.025em;
}
.project-subtitle { color: var(--muted); font-size: .95rem; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 2.45rem;
  min-width: 2.25rem;
  padding: .43rem .78rem;
  border: 1px solid #afc2cb;
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: .91rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.btn:not(:disabled):hover { background: var(--layer); border-color: #7994a1; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #ffffff; }
.btn-primary:not(:disabled):hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #ffffff; }
.btn-subtle { border-color: var(--line); background: var(--layer); }
.btn-small { min-height: 2.1rem; padding: .28rem .52rem; font-size: .86rem; }
.btn[aria-pressed="true"] { border-color: var(--teal-line); background: var(--teal-soft); color: var(--teal-deep); }
.btn[aria-pressed="true"]:hover { background: #d9edef; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .18rem;
  padding: .25rem;
  margin-bottom: .68rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #e7eef2;
}
.tab {
  min-height: 2.28rem;
  padding: .38rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 670;
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); background: rgb(255 255 255 / 56%); }
.tab[aria-pressed="true"], .tab[aria-selected="true"], .tab[aria-current] {
  border-color: var(--teal-line);
  background: var(--paper);
  color: var(--teal-deep);
  font-weight: 760;
}

.documents-layout {
  display: grid;
  grid-template-columns: clamp(12rem, 22vw, 17.15rem) minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
}
.documents-layout.single-document, .documents-layout:has(> .empty-state) {
  grid-template-columns: minmax(0, 1fr);
}

.document-rail { padding: .75rem; }
.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .18rem .33rem .7rem;
}
.rail-head h2, .rail-head h3, .rail-head strong { font-size: 1rem; font-weight: 750; }
.rail-head span, .rail-head p { color: var(--muted); font-size: .83rem; }
.document-list {
  display: grid;
  align-content: start;
  gap: .3rem;
  max-height: min(38rem, 66vh);
  padding: .15rem .23rem .3rem .14rem;
  list-style: none;
  overflow: auto;
  scrollbar-width: thin;
}

.doc-button {
  display: grid;
  gap: .34rem;
  width: 100%;
  min-height: 3.1rem;
  padding: .55rem .6rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: start;
  text-decoration: none;
}
.doc-button:hover { background: var(--layer); border-color: var(--line); }
.doc-button[aria-pressed="true"], .doc-button[aria-current] {
  background: var(--teal-soft);
  border-color: var(--teal-line);
}
.doc-title { overflow-wrap: anywhere; font-weight: 710; font-size: .94rem; line-height: 1.35; }
.doc-button[aria-pressed="true"] .doc-title, .doc-button[aria-current] .doc-title { color: var(--teal-deep); }
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .23rem .44rem;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.3;
}

.chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.3rem;
  padding: .06rem .43rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  color: var(--muted);
  font-size: .77rem;
  font-weight: 670;
  white-space: nowrap;
}
.chip-current { border-color: var(--teal-line); color: var(--teal-deep); background: var(--teal-soft); }

.preview { min-height: 18rem; }
.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding: .82rem .95rem .75rem;
}
.preview-head > :first-child { min-width: 0; }
.preview-name { overflow-wrap: anywhere; font-size: clamp(1.13rem, 2.25vw, 1.42rem); font-weight: 760; }
.preview-meta { margin-top: .22rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.preview-actions, .preview-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .33rem; }
.preview-controls {
  justify-content: flex-start;
  min-height: 2.72rem;
  padding: .3rem .92rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--layer);
}
.preview-head > .preview-controls {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.page-count {
  min-width: 6rem;
  padding-inline: .3rem .65rem;
  color: var(--muted);
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  white-space: nowrap;
}
.preview-stage {
  min-width: 0;
  min-height: 15rem;
  max-height: max(23rem, 68vh);
  overflow: auto;
  padding: clamp(.6rem, 1.7vw, 1.1rem);
  background: #dce7ec;
  overscroll-behavior-x: contain;
  scrollbar-color: #7f99a7 #edf3f6;
  scrollbar-gutter: stable;
}
.preview-stage:focus-visible { outline-offset: -4px; }
.page-stack {
  display: grid;
  gap: clamp(.55rem, 1.25vw, .95rem);
  width: var(--page-width, 100%);
  margin-inline: auto;
}
.pdf-page {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  aspect-ratio: var(--page-ratio, 210 / 297);
  border: 1px solid #c8d5dc;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.pdf-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.preview-page-error {
  position: absolute;
  inset: 1rem 1rem auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--muted);
}

.preview-table { padding: .85rem .95rem 1.05rem; border-top: 1px solid var(--line); }
.preview-table h3 { font-size: 1.05rem; }
.table-scroll {
  max-height: max(19rem, 58vh);
  width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #7f99a7 #edf3f6;
}
.preview-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: start;
  font-size: .95rem;
}
.preview-table th, .preview-table td {
  padding: .58rem .73rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  vertical-align: top;
}
.preview-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #e5f0f3;
  color: var(--ink);
  font-weight: 720;
  text-align: start;
}
.preview-table tbody th { width: 37%; color: var(--ink); font-weight: 670; text-align: start; }
.preview-table tr:last-child td { border-bottom: 0; }
.preview-table tbody tr:nth-child(even) { background: var(--layer); }
.preview-note { padding: .65rem .95rem; color: var(--muted); font-size: .86rem; }
.preview-head + .preview-note { padding-top: 0; }
.preview-table > .preview-note { padding-inline: 0; }
.preview-stage > .preview-note { width: fit-content; margin-bottom: .6rem; padding: .44rem .6rem; border-radius: 5px; background: var(--paper); }

.timeline {
  display: grid;
  min-width: 0;
  padding: .85rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  list-style: none;
}
.timeline > h2 { font-size: 1.2rem; }
.timeline > .preview-note { padding: .26rem 0 .45rem; }
.timeline > .btn { justify-self: start; margin-block-start: .65rem; }
.timeline-item {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr) auto;
  align-items: start;
  gap: .5rem .85rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-meta { display: flex; align-items: flex-start; flex-wrap: wrap; gap: .3rem .44rem; color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.timeline-body { min-width: 0; overflow-wrap: anywhere; }
.timeline-body h3, .timeline-body strong { color: var(--ink); font-size: .97rem; }
.timeline-body p { margin-top: .17rem; color: var(--muted); font-size: .9rem; }

.notice, .source-only {
  padding: .63rem .78rem;
  border: 1px solid var(--teal-line);
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: .9rem;
}
.source-only { display: grid; justify-items: start; gap: .58rem; margin: 0 .9rem .95rem; padding: 1rem; }
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .3rem .9rem;
  width: min(100%, 1500px);
  margin-inline: auto;
  padding: 0 clamp(.9rem, 3vw, 2.25rem) 1.7rem;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

dialog.presentation-dialog {
  width: min(calc(100% - 1.5rem), 38rem);
  max-height: min(87vh, 42rem);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 70px rgb(12 29 42 / 24%);
}
dialog.presentation-dialog::backdrop { background: rgb(10 27 40 / 52%); }
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .65rem;
  padding: 1rem 1.15rem .7rem;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 { font-size: 1.35rem; }
.dialog-head p { margin-top: .35rem; color: var(--muted); font-size: .92rem; }
.dialog-list { padding: 0 1.15rem .5rem; }
.dialog-group { padding: .58rem 0 .3rem; border: 0; }
.dialog-group h3, .dialog-group legend {
  width: 100%;
  padding: .36rem 0 .3rem;
  color: var(--teal-deep);
  font-size: .91rem;
  font-weight: 720;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  min-height: 2.48rem;
  padding: .4rem .35rem;
  border-radius: 5px;
  cursor: pointer;
}
.checkbox-row:hover { background: var(--layer); }
.checkbox-row input { flex: none; width: 1rem; height: 1rem; margin: .22rem 0 0; accent-color: var(--teal); }
.checkbox-row small { display: block; color: var(--muted); }
.dialog-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
  padding: .7rem 1.15rem;
  border-top: 1px solid var(--line);
  background: var(--layer);
}
.dialog-footer p { margin-inline-end: auto; color: var(--muted); font-size: .89rem; }

.is-presenting .shell { padding-top: .85rem; }
.is-presenting .breadcrumbs, .is-presenting [data-archive-only], .is-presenting .footer { display: none; }
.is-presenting .project-heading { margin-bottom: .62rem; }
.is-presenting .preview-stage { max-height: max(25rem, 77vh); }
.is-presenting .table-scroll { max-height: max(20rem, 70vh); }

@media (max-width: 780px) {
  .library-layout { grid-template-columns: minmax(0, 1fr); }
  .industry-nav { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.15rem), 1fr)); }
  .industry-panel { padding: .65rem; }
  .industry-panel > h2, .industry-panel > h3 { margin-bottom: .4rem; }
  .industry-button { min-height: 2.45rem; }
  .documents-layout { grid-template-columns: minmax(0, 1fr); }
  .document-rail { padding: .52rem; }
  .document-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.25rem), 1fr)); max-height: min(18rem, 32vh); }
  .rail-head { padding-bottom: .35rem; }
  .preview-stage { max-height: max(20rem, 63vh); }
}

@media (max-width: 480px) {
  .topbar-inner { min-height: 3.65rem; gap: .45rem; }
  .top-actions { gap: .25rem; }
  .brand { gap: .42rem; }
  .brand-mark { width: clamp(4.25rem, 22vw, 6.1rem); }
  .brand-copy strong { font-size: .94rem; }
  .shell { padding-top: .88rem; }
  .library-heading { margin-top: 1.25rem; }
  .project-heading { margin-bottom: .75rem; }
  .project-actions { width: 100%; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 auto; padding-inline: .53rem; }
  .preview-head { padding-inline: .72rem; }
  .preview-controls { padding-inline: .7rem; }
  .preview-actions { gap: .3rem; }
  .preview-table { padding-inline: .7rem; }
  .preview-table th, .preview-table td { padding: .45rem .38rem; font-size: .87rem; }
  .timeline-item { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .65rem; }
  .timeline-meta { grid-column: 1 / -1; }
}

@media (pointer: coarse) {
  .btn, .industry-button, .tab, .checkbox-row, .customer-filter select { min-height: 44px; }
}

@media print {
  @page { margin: 12mm; }
  :root { font-size: 12px; }
  body { background: #ffffff; }
  .topbar, .breadcrumbs, .project-actions, .tabs, .document-rail, .preview-actions, .preview-controls, .footer { display: none; }
  body:has(.page-stack) .project-heading,
  .preview:has(.page-stack) .preview-head,
  .preview:has(.page-stack) > .preview-note { display: none; }
  .shell { padding: 0; }
  .documents-layout { display: block; }
  .preview { min-height: 0; overflow: visible; border: 0; box-shadow: none; }
  .preview-stage {
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: #ffffff;
    scrollbar-gutter: auto;
  }
  .page-stack { display: block; width: 100%; }
  .pdf-page { break-inside: avoid; aspect-ratio: auto; border: 0; box-shadow: none; }
  .pdf-page + .pdf-page { break-before: page; }
  .table-scroll { max-height: none; overflow: visible; }
  .pdf-image { width: auto; height: auto; max-width: 100%; max-height: 240mm; margin-inline: auto; }
  .preview-page-error { position: static; }
}
