/*
 * Two-column article layout (content + sidebar notes), ported from the
 * updated-blog-site prototype. Defaults documented in dev-notes/.
 */

:root {
  --mms-font-serif: "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --mms-font-sans: "Montserrat", -apple-system, "Segoe UI", system-ui, sans-serif;

  --mms-content-flex-basis: 888px;
  --mms-content-text-width: 760px;
  --mms-content-offset: 226px;

  --mms-notes-flex-basis: 312px;
  --mms-notes-max-width: 455px;
  --mms-notes-text-width: 260px;
  --mms-notes-offset: 4px;

  --mms-gutter: 48px;
}

.mms-article-layout {
  display: flex;
  width: 100%;
  padding: 80px 0 120px 24px;
  font-family: var(--mms-font-serif);
  font-size: 17px;
  line-height: 1.65;
}

.mms-content-container {
  flex: 1 1 var(--mms-content-flex-basis);
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

.mms-content {
  width: 100%;
  max-width: var(--mms-content-text-width);
  margin-left: var(--mms-content-offset);
}

.mms-divider {
  flex: 0 0 1px;
  align-self: stretch;
  background: #000;
  margin-left: var(--mms-gutter);
}

.mms-notes-container {
  flex: 0 0 var(--mms-notes-max-width);
  width: var(--mms-notes-max-width);
  padding-left: var(--mms-gutter);
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  box-sizing: border-box;
}

.mms-notes {
  width: 100%;
  max-width: var(--mms-notes-text-width);
  margin-left: var(--mms-notes-offset);
  min-height: 100%;
  position: relative;
}

.mms-content h1 {
  font-family: var(--mms-font-sans);
  font-size: 48px;
  line-height: 1.3;
  margin: 0 0 16px;
  font-weight: 700;
}

.mms-content h2 {
  font-family: var(--mms-font-sans);
  font-size: 23px;
  line-height: 1.2;
  margin: 48px 0 16px;
  font-weight: 800;
}

.mms-content p {
  margin: 0 0 24px;
}

.mms-content p:first-of-type::first-letter {
  font-family: var(--mms-font-sans);
  font-size: 64px;
  font-weight: 700;
  color: var(--jrt-color-accent);
  float: left;
  line-height: 0.8;
  margin: 4px 8px 0 0;
}

.mms-content ul {
  list-style: none;
  margin: 0 0 24px;
  padding-left: 0;
}

.mms-content ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
}

.mms-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  background-image: url("../images/bullets/bullet-emerald.svg");
  background-size: contain;
  background-repeat: no-repeat;
}

.mms-ref {
  color: var(--jrt-color-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: default;
}

.mms-note {
  font-family: var(--mms-font-serif);
  font-size: 14px;
  font-style: italic;
  line-height: 1.65;
  color: var(--jrt-color-muted);
  margin: 0 0 32px;
  width: 100%;
  transition: top 0.15s ease;
}

.mms-note span {
  display: inline-block;
  color: var(--jrt-color-accent);
  font-weight: 600;
  margin-right: 6px;
}

/* Generic static page (About, Privacy Policy, etc.) — single centered
   column, no sidebar notes. Reuses the article's typography tokens. */
.jrt-page {
  width: 100%;
  padding: 80px 24px 120px;
  font-family: var(--mms-font-serif);
  font-size: 17px;
  line-height: 1.65;
}

.jrt-page-inner {
  max-width: var(--mms-content-text-width);
  margin: 0 auto;
}

.jrt-page-inner h1 {
  font-family: var(--mms-font-sans);
  font-size: 48px;
  line-height: 1.3;
  margin: 0 0 32px;
  font-weight: 700;
}

.jrt-page-inner p {
  margin: 0 0 24px;
}

/* Apply directly to an <img> tag, or to a wrapper around one (e.g. via
   the block editor's Advanced panel → Additional CSS Class(es)) —
   covers both cases. Used on the About page's photo. */
.jrt-circle-photo,
.jrt-circle-photo img {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.jrt-about-page {
  text-align: center;
}

.jrt-about-page h1,
.jrt-about-page p {
  text-align: left;
}

.jrt-about-page-photo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.jrt-about-page-photo img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
}

.jrt-subscribe-page #mc_embed_signup {
  margin-top: 32px;
}

.jrt-subscribe-field {
  margin-bottom: 16px;
}

.jrt-subscribe-field label {
  display: block;
  font-family: var(--mms-font-sans);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.jrt-subscribe-field input {
  width: 100%;
  max-width: 360px;
  font-family: var(--mms-font-serif);
  font-size: 16px;
  padding: 12px 18px;
  border: 1px solid var(--jrt-color-rule);
  border-radius: 999px;
}

.jrt-subscribe-responses .response {
  font-family: var(--mms-font-sans);
  font-size: 14px;
  margin-bottom: 16px;
}

#mce-error-response {
  color: var(--jrt-color-brick);
}

#mce-success-response {
  color: var(--jrt-color-accent);
}

.jrt-subscribe-badge {
  margin-top: 24px;
}

.jrt-404 {
  text-align: center;
}

.jrt-404 p {
  color: var(--jrt-color-muted);
}

/* Below this width, there isn't enough room for content (760px) + divider/gutter
   (~49px) + the fixed-width notes column (455px) + page padding (~24px) without
   squeezing content below its intended width, so notes collapse under the
   article instead of sitting beside it. */
@media (max-width: 1320px) {
  .mms-article-layout {
    flex-direction: column;
    padding: 48px 24px 80px;
    max-width: var(--mms-content-text-width);
    margin: 0 auto;
  }

  .mms-content-container,
  .mms-notes-container {
    flex: 1 1 auto;
    width: 100%;
  }

  .mms-content {
    margin-left: 0;
  }

  .mms-divider {
    display: none;
  }

  .mms-notes {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--jrt-color-rule);
  }

  .mms-note {
    position: static !important;
    margin-bottom: 28px;
    border-top: 1px solid var(--jrt-color-rule);
    padding-top: 14px;
  }

  .mms-content h1 {
    font-size: 32px;
  }
}
