/* ==========================================================================
   TWINX3 — WordPress additions.

   The two stylesheets before this one are the approved design, unchanged. This
   file holds only what running inside WordPress adds: the states an editor can
   create that a static build never had, the markup the block editor emits, and
   the admin bar.

   Nothing here restyles the design. If a rule in this file is doing that,
   it is in the wrong file.
   ========================================================================== */

/* ---------- 1. THE ADMIN BAR ---------------------------------------------
   The navigation is fixed to the top of the viewport, and so is the admin
   bar, so logged-in editors had the first 32px of the header behind it. */

body.admin-bar .nav { top: 32px; }
body.admin-bar .menu { top: 32px; }

@media (max-width: 782px) {
  body.admin-bar .nav,
  body.admin-bar .menu { top: 46px; }
}

/* ---------- 2. AN EMPTY IMAGE FIELD --------------------------------------
   A section whose photograph has not been chosen yet. The design has no state
   for this because a static build could not reach it; in the editor it is
   reachable on every page, and a collapsed section reads as a broken layout
   rather than as an empty field.

   So: hold the space, say nothing, and keep the surrounding composition
   intact. Deliberately quiet — this is scaffolding, not a placeholder
   graphic, and it should look like an absence rather than a thing. */

.tw-noimg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 180px;
  background:
    repeating-linear-gradient(135deg,
      rgba(111, 101, 85, .055) 0 10px,
      rgba(111, 101, 85, .015) 10px 20px);
  border: 1px solid rgba(111, 101, 85, .14);
}

/* Where the frame is in normal flow rather than absolute, the placeholder has
   to supply its own height or it collapses to nothing. */
.story__figA > .tw-noimg,
.story__figB > .tw-noimg,
.aseq__frame > .tw-noimg,
.pgal__frame > .tw-noimg { position: relative; aspect-ratio: 4 / 3; }

.phero__media > .tw-noimg,
.pcta__media > .tw-noimg,
.pfeat__media > .tw-noimg,
.show__media > .tw-noimg { border: 0; background: var(--espresso); }

/* ---------- 3. PAGES WITH NO TEMPLATE ------------------------------------
   A privacy policy, a thank-you page, a 404. Shorter hero, and the editor's
   own content set in the site's reading measure. */

.phero--plain { min-height: clamp(300px, 46svh, 500px); }
.phero__act { margin-top: clamp(24px, 3vh, 40px); }

.prose-sect { padding-block: clamp(56px, 9vh, 120px); }

.prose {
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.05vw, 16.5px);
  line-height: 1.78;
}
.prose > * + * { margin-top: 1.15em; }
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: -.012em;
  margin-top: 2.2em;
}
.prose h2 { font-size: clamp(1.5rem, 2.35vw, 2.35rem); }
.prose h3 { font-size: clamp(1.2rem, 1.6vw, 1.6rem); }
.prose h4 { font-size: clamp(1.05rem, 1.2vw, 1.2rem); }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; }
.prose a:hover { color: var(--brass, var(--ink)); }
.prose ul,
.prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose img { max-width: 100%; height: auto; display: block; }
.prose blockquote {
  margin-left: 0;
  padding-left: 1.4em;
  border-left: 1px solid rgba(111, 101, 85, .3);
  font-family: var(--display);
  font-size: 1.2em;
  line-height: 1.4;
  color: var(--ink);
}
.prose code,
.prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: rgba(111, 101, 85, .07);
}
.prose code { padding: .12em .34em; border-radius: 3px; }
.prose pre { padding: 1em 1.1em; overflow-x: auto; border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th,
.prose td { padding: .6em .8em; border-bottom: 1px solid rgba(111, 101, 85, .18); text-align: left; }

.plainlist { list-style: none; padding: 0; }
.plainlist li + li { margin-top: .6em; }
.plainlist a { color: var(--ink); text-decoration: none; }
.plainlist a:hover { text-decoration: underline; }

/* ---------- 4. BLOCK EDITOR MARKUP --------------------------------------
   Classes WordPress emits whether the theme asked for them or not. Supporting
   them costs a few lines; not supporting them means a client's pasted image
   sits at the wrong width and nobody can explain why. */

.prose .alignleft { float: left; margin: .4em 1.6em 1em 0; }
.prose .alignright { float: right; margin: .4em 0 1em 1.6em; }
.prose .aligncenter { margin-inline: auto; }
.prose .alignwide { width: min(100%, 86ch); max-width: none; margin-inline: auto; }
.prose .alignfull { width: 100%; }

.prose .wp-caption,
.prose figure { max-width: 100%; margin-inline: 0; }
.prose .wp-caption-text,
.prose figcaption {
  margin-top: .7em;
  font-size: clamp(11.5px, .78vw, 13px);
  color: var(--ink-soft);
  line-height: 1.55;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Pagination on the fallback listing. */
.prose .nav-links { display: flex; flex-wrap: wrap; gap: .8em; margin-top: 2.4em; }
.prose .page-numbers {
  padding: .4em .8em;
  border: 1px solid rgba(111, 101, 85, .24);
  text-decoration: none;
  color: var(--ink);
}
.prose .page-numbers.current { background: var(--ink); color: var(--ivory); }

/* ---------- 5. THE CUSTOMIZER PREVIEW -----------------------------------
   Scroll-driven reveals and the pinned sections are built against a real
   scroll container; inside the Customizer's iframe the page is reloaded on
   every keystroke and a section mid-pin can be left blank. Showing everything
   is the honest preview. */

body.twinx3-preview [data-rise],
body.twinx3-preview [data-reveal-img],
body.twinx3-preview [data-hero-in],
body.twinx3-preview .ln > span {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}
