.xaver-logo {
  margin: auto;
  display: block;
  width: 100px;
  height: 25px;
  background: url("/xaver-mini.png") no-repeat;
  transition: all 0.2s ease-in-out;
}

.xaver-logo.xaver-hover:hover {
  background-position: bottom;
}

/* Pagy pagination */
nav.pagy {
  display: flex;
  gap: 0.25rem;
}
nav.pagy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--xv-charcoal, #323132);
  transition: all 0.15s;
}
nav.pagy a:hover {
  background-color: var(--xv-mist, #EDF1F7);
  color: var(--xv-orange, #F09124);
}
nav.pagy a[aria-disabled] {
  color: #d1d5db;
  pointer-events: none;
}
nav.pagy a[aria-current="page"] {
  background-color: var(--xv-orange, #F09124);
  color: #fff;
}

/*
 * Trix rich-text typography. Tailwind's preflight strips list markers, block
 * spacing and heading styles, so both the editor (<trix-editor>) and any rendered
 * `.trix-content` that is NOT wrapped in `.prose` lose their formatting (bullets
 * vanish, spacing collapses). Restore it for:
 *   - `trix-editor`:     the editing view.
 *   - `.quote-document`: the client quote document (proposals/_document), a
 *                         bespoke non-`.prose` render used in the admin live
 *                         preview and the public proposal page. Its opening note
 *                         (`.quote-intro`) was losing its bullets here.
 * Rendered rich text wrapped in `.prose` (proposal show, blog, newsletter) is
 * styled by the typography plugin and left untouched. This file is @imported after
 * `tailwindcss`, so these rules sit after preflight in the cascade.
 */
trix-editor.trix-content h1,
trix-editor.trix-content h2,
.quote-document .trix-content h1,
.quote-document .trix-content h2 { font-size: 1.25em; font-weight: 700; line-height: 1.3; margin: 1em 0 0.5em; }
trix-editor.trix-content h3,
.quote-document .trix-content h3 { font-size: 1.1em; font-weight: 600; line-height: 1.3; margin: 1em 0 0.5em; }
trix-editor.trix-content p,
.quote-document .trix-content p { margin: 0.75em 0; }
trix-editor.trix-content ul,
trix-editor.trix-content ol,
.quote-document .trix-content ul,
.quote-document .trix-content ol { margin: 0.75em 0; padding-left: 1.5em; }
trix-editor.trix-content ul,
.quote-document .trix-content ul { list-style: disc; }
trix-editor.trix-content ol,
.quote-document .trix-content ol { list-style: decimal; }
trix-editor.trix-content li,
.quote-document .trix-content li { margin: 0.25em 0; }
trix-editor.trix-content a,
.quote-document .trix-content a { color: var(--xv-orange); text-decoration: underline; }
trix-editor.trix-content strong,
.quote-document .trix-content strong { font-weight: 700; }

/*
 * Attachments inside the editor show at a working size. Trix renders each
 * dropped image at its natural resolution, so a 2K screenshot fills screens
 * of editor and a preview that is still uploading (or failed) becomes a
 * giant blank block that cannot even be selected. Scoped to trix-editor
 * only: the published render goes through _blob.html.erb, which bounds the
 * real output, and .prose handles its styling.
 */
trix-editor.trix-content .attachment img {
  max-height: 20rem;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}
trix-editor.trix-content .attachment--preview {
  text-align: center;
}
/* The still-uploading / no-preview state keeps a visible, selectable body
   instead of an unbounded white void. */
trix-editor.trix-content .attachment--file {
  border: 1px dashed var(--color-gray-300, #d1d5db);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

/* A video dropped into an article. A landscape one takes the column. A phone
   cut would run a screen tall there with empty space either side, so on wide
   screens it sits to the left and the words that follow it run alongside;
   the next heading starts clear of it. */
.trix-content .attachment--video {
  display: block;
  margin: 2em 0;
}
.trix-content .attachment--video video {
  display: block;
  margin-inline: auto;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 1rem;
  background: var(--xv-navy);
}
@media (min-width: 768px) {
  .trix-content action-text-attachment:has(> .attachment--video-tall) {
    float: left;
    width: 15rem;
    margin: 0.4em 2.25rem 2.5rem 0;
  }
  .trix-content .attachment--video-tall { margin: 0; }
  .trix-content :is(h1, h2, h3) { clear: both; }
  .trix-content blockquote { display: flow-root; }
}

/* A video in the editor. Trix previews every attachment as an <img>, and an
   mp4 is not one: it showed as a broken picture. Stand a play tile in its
   place; the file name and size sit under it as for any attachment. */
trix-editor.trix-content .attachment--mp4 img { display: none; }
trix-editor.trix-content .attachment--mp4::before {
  content: "▶";
  display: grid;
  place-items: center;
  width: 9rem;
  aspect-ratio: 16 / 10;
  margin: 0.5rem auto;
  border-radius: 0.75rem;
  background: var(--xv-navy);
  color: #fff;
  font-size: 1.5rem;
}
