/* Documents. Path: /home/designfi/uberfife.com/modules/documents/assets/documents.css */
.docs { padding: clamp(2rem, 7vw, 5rem) var(--gutter) var(--space); }
.docs__title { font-size: clamp(2.3rem, 8vw, 4.5rem); font-weight: 800; letter-spacing: -0.035em; }
.docs__intro { color: var(--muted); max-width: 40rem; margin: 1rem 0 1.5rem; }
.docs__layout { display: grid; gap: 1.5rem; }
/* Grid and fieldset children would otherwise refuse to shrink below their content, making phones scroll sideways. */
.docs__layout > * { min-width: 0; }
.docs__filters fieldset { min-inline-size: 0; }
.docs__search .btn { flex: none; }
/* Filters fold behind a button on phones (summary hidden on desktop, where they are always shown). */
.docs__filterbox > summary { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.5rem 1.1rem; border-radius: var(--r-pill); background: var(--card); font-weight: 700; cursor: pointer; list-style: none; }
.docs__filterbox > summary::-webkit-details-marker { display: none; }
.docs__filterbox > summary::after { content: "+"; font-weight: 400; font-size: 1.25rem; line-height: 1; }
.docs__filterbox[open] > summary::after { content: "−"; }
.docs__filterbox[open] > summary { margin-bottom: 1.25rem; }
.docs__filterbox .count--active { background: var(--ink); color: var(--paper); border-radius: var(--r-pill); padding: 0 0.5rem; font-size: 0.8rem; }
.docs__search { display: flex; gap: 0.5rem; }
.docs__search input { flex: 1; min-width: 0; min-height: 3.25rem; padding: 0 1rem; font: inherit; font-size: 1.1rem; background: var(--card); border: 2px solid transparent; border-radius: var(--r-sm); }
.docs__search input:focus { outline: none; border-color: var(--ink); background: var(--paper); }
.docs__filters fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.docs__filters legend { font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.5rem; }
.docs__filters .check { display: flex; gap: 0.6rem; align-items: center; padding: 0.3rem 0; }
.docs__filters .check input { width: 1.2rem; height: 1.2rem; accent-color: var(--ink); }
.docs__filters .count { color: var(--muted); font-size: 0.85rem; }
.docs__apply { display: flex; gap: 1rem; align-items: center; }
@media (min-width: 960px) {
  .docs__layout { grid-template-columns: 15rem 1fr; }
  .docs__filterbox > summary { display: none; }
  .docs__search { grid-column: 1 / -1; }
}
.docs__subtitle { font-size: 1.15rem; font-weight: 800; margin: 0 0 0.75rem; }
.docs__featured { margin-bottom: 2rem; }
.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.doc__title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.doc__title a { text-decoration: none; }
.doc__title a:hover { text-decoration: underline; }
.doc__date { margin: 0.3rem 0 0; color: var(--muted); }
.doc__meta { margin: 0.15rem 0 0; font-weight: 600; font-size: 0.9rem; }
.doc__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; }
.doc__actions .btn { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.95rem; }
.doc__format { font-weight: 400; color: var(--muted); }
.docs__pager { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.doc-file { background: var(--card); border-radius: var(--r-md); padding: 1.25rem; margin-bottom: 1.5rem; }
.doc-file__name { margin: 0; font-weight: 700; }
.doc-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0 0 1rem; }
.doc-meta dt { font-weight: 700; }
.doc-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .doc-meta { grid-template-columns: 1fr; gap: 0; }
  .doc-meta dt { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); }
  .doc-meta dt:first-child { margin-top: 0; }
}
/* The card is pale grey, so its secondary button needs a white face to read as a button. */
.doc-file .btn--secondary { background: var(--paper); }
.doc-file .btn--secondary:hover { background: var(--card-hover); }
@media (pointer: coarse) {
  .doc__actions .btn { min-height: 2.75rem; }
  .docs__filters .check { padding: 0.5rem 0; }
  .docs__filters .check input { width: 1.5rem; height: 1.5rem; }
  .doc-versions summary { padding: 0.7rem 0; }
}
.doc-cite { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.doc-cite__title { font-size: 1.1rem; font-weight: 800; }
.doc-cite__text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.875rem; background: var(--card); padding: 0.75rem 1rem; border-radius: var(--r-sm); overflow-wrap: anywhere; margin: 0.75rem 0 0.5rem; }
.doc-versions { margin-top: 1.5rem; }
.doc-versions summary { cursor: pointer; font-weight: 700; }
.doc-versions ul { padding-left: 1.2rem; }
.doc-versions li { margin: 0.6rem 0; }
.doc-sha { display: block; font-size: 0.75rem; color: var(--muted); overflow-wrap: anywhere; }
.block--document__note { font-weight: 600; margin-bottom: 0.5rem; }

/* "Why this document matters" */
.doc__why { margin: 0.4rem 0 0; max-width: 42rem; }
.doc-why { border-left: 4px solid var(--ink); padding: 0.25rem 0 0.25rem 1.1rem; margin-bottom: 1.75rem; }
.doc-why__title { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 0.4rem; }
.doc-why p { margin: 0; font-size: 1.1rem; line-height: 1.55; }

/* "Boxes" layout: a grid of document boxes in the results column (sidebar unchanged). */
.doc-boxes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }
@media (min-width: 600px) { .doc-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .doc-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
.docs__featured .doc-boxes { margin-bottom: 0.5rem; }
.doc-box { position: relative; display: flex; flex-direction: column; gap: 0.45rem; padding: 1.25rem; background: var(--card); border-radius: var(--r-md); min-width: 0; transition: background-color 0.15s ease; }
.doc-box:hover { background: var(--card-hover); }
.doc-box__icon { margin-bottom: 0.35rem; }
.doc-icon { display: block; width: 3.25rem; height: auto; }
.doc-box__meta { margin: 0; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.doc-box__title { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; overflow-wrap: anywhere; }
.doc-box__link { text-decoration: none; color: inherit; }
/* The title link covers the box, so the whole box is clickable. */
.doc-box__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.doc-box__link:focus-visible { outline: none; }
.doc-box__link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.doc-box:hover .doc-box__title { text-decoration: underline; text-underline-offset: 0.18em; }
.doc-box__text { margin: 0; font-size: 0.95rem; color: #3a3a3a; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.doc-box__foot { margin: auto 0 0; padding-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .doc-box { transition: none; } }
@media print { .doc-box { border: 1px solid #999; background: none; } }
