/* ==========================================================================
   UA Living Spec Book — print / Save-as-PDF stylesheet
   Loaded with media="print"; no @media wrapper required.
   Grayscale values here are print conventions, not brand colors.
   ========================================================================== */

@page {
  margin: 18mm;
}

html,
body {
  background: #fff !important;
  color: #000;
}

body {
  font-size: 10.5pt;
  line-height: 1.55;
}

* {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ----------------------------------------------------------------------
   Hide interactive chrome
   ---------------------------------------------------------------------- */
.ua-portal-header,
.ua-progressbar,
.sb-toolbar,
.toc-sidebar,
.toc-fab,
.toc-drawer,
.sb-pins-panel,
.sb-whatsnew,
.ua-toast-region,
.ua-modal,
.ua-skip-link,
.sb-section__actions,
.sb-sched-toolbar,
.sb-approval__actions,
.sb-comments,
button:not(.sb-photo__trigger):not(.sb-moodboard__trigger):not(.sb-sched__thumb),
.ua-btn,
.lbx,
.ua-overlay,
.toc-overlay,
[class^='srch-'],
[class*=' srch-'] {
  display: none !important;
}

/* Image-wrapping trigger buttons must keep printing their photos. */
.sb-photo__trigger,
.sb-moodboard__trigger,
.sb-sched__thumb {
  display: block !important;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
}

.sb-sched__thumb {
  width: 14mm;
  height: 14mm;
}

/* ----------------------------------------------------------------------
   Links: text only, no URL spam
   ---------------------------------------------------------------------- */
a,
a:visited {
  color: #000;
  text-decoration: none;
}

a[href]::after {
  content: none !important;
}

/* ----------------------------------------------------------------------
   Layout: single column, full width
   ---------------------------------------------------------------------- */
.sb-layout {
  display: block;
  width: 100%;
}

.sb-content {
  padding-bottom: 0;
}

/* ----------------------------------------------------------------------
   Hero becomes a typeset cover block
   ---------------------------------------------------------------------- */
.sb-hero {
  position: static;
  display: block;
  min-height: 0;
  overflow: visible;
  background: none;
  color: #000;
  page-break-after: always;
  break-after: page;
}

.sb-hero::before,
.sb-hero::after {
  display: none;
}

.sb-hero > img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  max-height: 38vh;
  object-fit: cover;
  margin-bottom: 8mm;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.sb-hero > .ua-img-fallback {
  display: none;
}

.sb-hero__content,
.sb-hero > :not(img):not(.ua-img-fallback) {
  position: static;
  display: block;
  padding: 0;
}

.sb-hero h1,
.sb-hero p,
.sb-hero .ua-eyebrow,
.sb-hero time {
  color: #000;
  opacity: 1;
}

.sb-hero h1 {
  margin: 0 0 4mm;
}

.sb-hero .ua-chip {
  display: inline-block;
  border: 1px solid #999;
  background: none;
  color: #000;
  margin: 0 2mm 2mm 0;
}

.sb-hero .ua-progress {
  display: none;
}

/* ----------------------------------------------------------------------
   Sections: one chapter per page
   ---------------------------------------------------------------------- */
.sb-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  page-break-before: always;
  break-before: page;
}

.sb-section:first-of-type {
  page-break-before: auto;
  break-before: auto;
}

.sb-section__title,
.sb-section__meta,
.sb-section__intro {
  color: #000;
}

.sb-section__num {
  color: #999;
}

.sb-section__head {
  page-break-after: avoid;
  break-after: avoid;
}

/* Keep coherent blocks intact where sane */
.ua-card,
.ua-stat,
.sb-swatch,
.sb-budget-row,
.sb-doc,
.sb-rev,
.sb-note,
.sb-milestone,
.sb-approval,
.sb-vendor,
.sb-comment,
.sb-pin,
figure,
tr {
  page-break-inside: avoid;
  break-inside: avoid;
}

.ua-card,
.sb-note,
.sb-swatch,
.db-project-card {
  background: none;
  border: 1px solid #ccc;
}

/* ----------------------------------------------------------------------
   Tables
   ---------------------------------------------------------------------- */
.ua-table-wrap {
  overflow: visible;
}

.ua-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
}

.ua-table th,
.ua-table td {
  border: 1px solid #ccc;
  padding: 2mm 2.5mm;
  text-align: left;
  vertical-align: top;
  color: #000;
}

.ua-table thead {
  display: table-header-group;
}

.sb-sched__thumb {
  width: 14mm;
  height: 14mm;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

/* ----------------------------------------------------------------------
   Badges print as outlined text
   ---------------------------------------------------------------------- */
.ua-badge {
  background: none !important;
  color: #000 !important;
  border: 1px solid #999 !important;
}

.ua-chip {
  background: none;
  color: #000;
  border: 1px solid #999;
}

/* ----------------------------------------------------------------------
   Accordions forced open, chevrons hidden
   ---------------------------------------------------------------------- */
details > * {
  display: block;
}

details summary {
  list-style: none;
  font-weight: 600;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary .ua-icon,
details summary::after,
details summary::before {
  display: none;
}

/* ----------------------------------------------------------------------
   Before/after sliders render side by side
   ---------------------------------------------------------------------- */
.ba,
.ba-slider,
.ba-compare,
.ba-frame {
  position: static !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 4mm;
  height: auto !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  border: 0;
}

.ba img,
.ba-slider img,
.ba-compare img,
.ba-frame img {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  clip-path: none !important;
  transform: none !important;
  object-fit: contain;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.ba-handle,
.ba__handle,
.ba-divider,
.ba__divider,
.ba input[type='range'],
.ba-slider input[type='range'],
.ba-compare input[type='range'] {
  display: none !important;
}

.ba-label,
.ba__label,
[class^='ba__label'],
.ba-tag {
  position: static !important;
  display: block !important;
  background: none !important;
  border: 0 !important;
  color: #000 !important;
  font-size: 8pt;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 1mm 0 0;
}

/* ----------------------------------------------------------------------
   Plan viewer: static image, no pan/zoom chrome
   ---------------------------------------------------------------------- */
.plv {
  page-break-inside: avoid;
  break-inside: avoid;
}

.plv__stage {
  position: static;
  height: auto !important;
  overflow: visible;
  cursor: default;
}

.plv__img {
  position: static !important;
  transform: none !important;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.plv__controls {
  display: none !important;
}

.sb-plans img {
  width: 100%;
  height: auto;
}

/* ----------------------------------------------------------------------
   Section-body specifics
   ---------------------------------------------------------------------- */
.sb-moodboard,
.sb-photo-grid {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
}

.sb-moodboard__item,
.sb-photo {
  grid-row: auto !important;
  cursor: default;
}

.sb-moodboard__item img,
.sb-photo img {
  height: auto;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.sb-moodboard__item figcaption,
.sb-photo figcaption {
  position: static;
  background: none;
  color: #000;
  padding: 1mm 0 0;
}

.sb-swatch__chip {
  border-bottom: 1px solid #ccc;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.sb-timeline::before {
  background: #999;
}

.sb-milestone__dot {
  background: #fff;
  border-color: #999;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.sb-milestone.is-done .sb-milestone__dot {
  background: #000;
  border-color: #000;
}

.sb-milestone.is-current .sb-milestone__dot {
  border: 2px solid #000;
  box-shadow: none;
}

.sb-bar__alloc {
  background: none;
  border: 1px solid #ccc;
}

.sb-bar__actual {
  background: #000;
  opacity: 1;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.sb-bar__actual.is-over,
.is-over .sb-bar__actual {
  background: #666;
}

.sb-comments .u-muted,
.sb-comments small {
  display: none;
}

/* Dashboard, if printed directly */
.db-project-card {
  cursor: default;
  transform: none !important;
}

.db-project-card img {
  transform: none !important;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.db-footer {
  border-top: 1px solid #ccc;
  color: #000;
}
