/* ==========================================================================
   MOTRIX — WordPress-only additions
   Things the static site never needed: the admin bar, editor-written page
   content (privacy policy etc.) and a few WordPress core class names.
   Loaded after pages.css.
   ========================================================================== */

/* --- Admin bar (logged-in users only). The header is sticky at top:0, which
   would slide underneath the fixed admin bar. Below 600px the admin bar
   scrolls away with the page, so no offset is needed there. */
@media (min-width: 601px) {
  .admin-bar .site-header { top: 46px; }
}

@media (min-width: 783px) {
  .admin-bar .site-header { top: 32px; }
}

/* --- WordPress core utility classes. */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Free-form page content (page.php: privacy policy, terms, any page
   without a dedicated MOTRIX template). */
.entry-content {
  max-width: 72ch;
  color: var(--c-text-soft);
}

.entry-content > * + * { margin-top: var(--sp-4); }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--sp-7);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.2;
}

.entry-content h2 { font-size: var(--fs-display-sm); }
.entry-content h3 { font-size: 1.25rem; }

.entry-content a {
  color: var(--c-lime);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.entry-content ul,
.entry-content ol { padding-left: 1.25em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: var(--sp-2); }

.entry-content img,
.entry-content figure { max-width: 100%; height: auto; }

.entry-content figure img { border-radius: var(--r-media); }

.entry-content figcaption {
  margin-top: var(--sp-2);
  font-size: var(--fs-fine);
  color: var(--c-text-mute);
}

.entry-content blockquote {
  padding-left: var(--sp-5);
  border-left: 3px solid var(--c-lime);
  color: var(--c-text);
}

.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th,
.entry-content td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--c-border);
  text-align: left;
}

/* Blog index / archive list (index.php) — only reached if posts are used. */
.post-list { display: grid; gap: var(--sp-5); }
.post-list__item { padding: var(--sp-5); }
.post-list__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--c-text);
}
.post-list__title a:hover { color: var(--c-lime); }
.post-list__meta { margin-top: var(--sp-1); font-size: var(--fs-fine); color: var(--c-text-mute); }

.nav-links { display: flex; gap: var(--sp-4); justify-content: space-between; margin-top: var(--sp-6); }
.nav-links a { color: var(--c-lime); }

/* --- Gallery. Wide tiles now follow each uploaded photo's orientation
   rather than a fixed hand-placed pattern, so let later square tiles
   back-fill any gap a wide tile leaves at the end of a row. */
@media (min-width: 1120px) {
  .gallery { grid-auto-flow: row dense; }
}

/* Message shown only when the Galerie page has no photos yet. */
.gallery-empty-note {
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  color: var(--c-text-mute);
}

/* --- Editor-only hints (rendered only for logged-in editors). */
.editor-hint {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-input);
  font-size: var(--fs-fine);
  color: var(--c-text-mute);
}
.editor-hint strong { color: var(--c-lime); }

/* Tables in legal pages (cookie list) scroll sideways on phones */
.entry-content .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--fs-fine); }
.entry-content th,
.entry-content td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid rgba(255, 255, 255, 0.12); text-align: left; vertical-align: top; }
.entry-content th { color: var(--c-text); font-weight: 700; }
.entry-content td:first-child { color: var(--c-text); font-family: ui-monospace, monospace; white-space: nowrap; }
