/* Site-wide polish on top of Tailwind. Industrial WiLL aesthetic. */

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

::selection { background: #ffcf2e; color: #12110e; }

mark, .bg-amber-100 {
  background: #fef3c7 !important;
  color: #78350f !important;
  padding: 0 2px;
}
html.dark mark, html.dark .bg-amber-100 {
  background: #422006 !important;
  color: #ffcf2e !important;
}

/* PDF viewer page gets a softer backdrop in dark mode. */
html.dark .pdf-pages { background: #2a2926; border-color: #3a3833; }
html.dark .pdf-pages__label { color: #a8a59a; }
html.dark .pdf-pages__page canvas { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Trim Tailwind's default prose feel to be more industrial. */
.prose-brand :where(h1,h2,h3,h4,h5,h6):not(:where([class~="not-prose"] *)) {
  letter-spacing: -0.01em;
}
.prose-brand :where(h2):not(:where([class~="not-prose"] *))::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 3px;
  background: #ffcf2e;
  margin-right: 10px;
  vertical-align: middle;
  margin-bottom: 4px;
}

/* Inline PDF preview toggle (<details> with a bespoke marker). */
.pdf-preview > summary { list-style: none; }
.pdf-preview > summary::-webkit-details-marker { display: none; }
.pdf-preview > summary::marker { content: ""; }
.pdf-preview .pdf-preview__close { display: none; }
.pdf-preview[open] .pdf-preview__open { display: none; }
.pdf-preview[open] .pdf-preview__close { display: inline; }
.pdf-preview iframe { border-radius: 2px; }

/* PDF.js render-all-pages viewer */
.pdf-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: #e5e3db;
  padding: 24px;
  border: 1px solid #cfcdc2;
  min-height: 60vh;
}
.pdf-pages__page {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.pdf-pages__page canvas {
  display: block;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  max-width: 100%;
  height: auto;
}
.pdf-pages__label {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #706e66;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 600;
}
.pdf-pages__status {
  color: #706e66;
  font-size: 14px;
  padding: 40px 0;
  font-weight: 500;
}
