/* Preserved from post.hbs; maintained in the theme. */
/* ══════════════════════════════════════════════════════════
     RUBICON ARTICLE TYPOGRAPHY (print-magazine feel)
     Owns the .rubicon-post / .r-* system — supersedes the old
     RUBICON-ISSUE1 block in Ghost Code Injection (remove that once live).
     ══════════════════════════════════════════════════════════ */
  .rubicon-post,
  .rb-article-head {
    --r-title:
      "adobe-jenson-pro", "Iowan Old Style", "Palatino Linotype", Palatino,
      "Book Antiqua", Georgia, serif;
    --r-body:
      "minion-pro", "Iowan Old Style", "Palatino Linotype", Palatino,
      "Book Antiqua", Georgia, serif;
    --r-ink: #2a2521;
    --r-black: #181310;
    --r-muted: #6f6358;
    --r-oxblood: #5a2e2e;
    --r-rule: rgba(90, 46, 46, 0.22);
  }

  /* article title (post title, rendered by the theme) */
  .rb-article-head {
    width: calc(100% - var(--container-gap) * 2);
    max-width: 660px;
    margin: 0 auto;
    padding: 44px 24px 0;
    box-sizing: border-box;
    text-align: left;
  }
  /* when the post has a feature image, lay the header out as [ title text | cover ] */
  .rb-article-head--cover {
    display: flex;
    gap: 36px;
    align-items: flex-start;
  }
  .rb-article-head--cover .rb-head-main {
    flex: 1 1 auto;
    min-width: 0;
  }
  .rb-head-cover {
    flex: 0 0 38%;
    max-width: 300px;
  }
  .rb-head-cover img {
    display: block;
    width: 100%;
    height: auto;
  }
  @media (max-width: 720px) {
    .rb-article-head--cover {
      flex-direction: column;
      gap: 22px;
    }
    .rb-head-cover {
      flex-basis: auto;
      max-width: none;
      width: 100%;
    }
  }
  .rb-article-issue {
    font-family: var(--r-title);
    font-variant: small-caps;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--r-muted);
    margin: 0 0 10px;
  }
  .rb-online-only-label--article {
    color: var(--r-muted);
  }
  .rb-article-kicker {
    font-family: var(--r-title);
    font-variant: small-caps;
    letter-spacing: 0.16em;
    font-size: 14px;
    color: var(--r-oxblood);
    margin: 0 0 14px;
  }
  .rb-article-title {
    font-family: var(--r-title);
    font-weight: 600;
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -0.005em;
    color: var(--r-black);
    text-wrap: balance;
    margin: 0;
  }

  /* content container + measure */
  .rubicon-post {
    font-family: var(--r-body);
    font-size: 20px;
    line-height: 1.52;
    color: var(--r-ink);
    max-width: 66ch;
    margin: 0 auto;
    padding: 0 24px;
    text-align: left;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "kern", "liga", "clig", "calt", "onum";
    font-variant-numeric: oldstyle-nums proportional-nums;
  }

  /* breathing room after the article, before the footer */
  .gh-main {
    padding-bottom: clamp(64px, 8vw, 104px);
  }

  /* end-of-article Letters & Comments note */
  .rb-letters-note {
    max-width: 720px;
    margin: 44px auto 0;
    padding: 22px 24px 0;
    border-top: 1px solid rgba(90, 46, 46, 0.2);
    text-align: center;
  }
  .rb-letters-note p {
    font-family:
      "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
      serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.6;
    color: #6f6358;
    margin: 0;
  }
  .rb-letters-note a {
    color: #5a2e2e;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .rb-letters-note a:hover {
    color: #841400;
  }

  /* the reviewed work — a white panel that stands out from the paper body.
     Global (not .rubicon-post-scoped) so it also works as a standalone HTML card. */
  .r-review-header {
    background: #fff;
    text-align: left;
    padding: 20px 26px;
    margin: 0 0 32px; /* space after the panel before the body text */
    border: 1px solid rgba(42, 35, 33, 0.1);
    box-shadow: 0 1px 3px rgba(42, 35, 33, 0.04);
    box-sizing: border-box;
  }
  /* standalone book-info card: pin to the reading measure and centre the panel.
     width:100% stops a grid item's auto margins from shrink-wrapping it. */
  .gh-content > .r-review-header {
    width: 100%;
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }
  /* one-line book citation: TITLE IN CAPS, the rest normal */
  .r-book {
    font-family:
      "minion-pro", "Iowan Old Style", "Palatino Linotype", Palatino,
      "Book Antiqua", Georgia, serif;
    font-size: 15px;
    line-height: 1.45;
    color: #2a2521;
    margin: 0.25em 0;
  }
  .r-book em,
  .r-book i {
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .rubicon-post .r-rh-title {
    font-family: var(--r-body);
    font-style: normal;
    font-weight: 700;
    font-size: 15.2px;
    line-height: 1.35;
    color: var(--r-ink);
    margin: 0 0 0.15em;
  }
  .rubicon-post .r-rh-title em,
  .rubicon-post .r-rh-title i {
    font-style: normal;
  } /* keep the book title upright even when writers wrap it in <em> */
  .rubicon-post .r-rh-author {
    font-family: var(--r-body);
    font-size: 12.8px;
    color: var(--r-ink);
    margin: 0.1em 0;
  }
  .rubicon-post .r-rh-pub {
    font-family: var(--r-body);
    font-size: 11.6px;
    color: var(--r-muted);
    margin: 0.1em 0;
  }

  /* byline — styled whether it sits inside .rubicon-post or is its own standalone HTML card.
     Explicit font stack because --r-title isn't in scope outside .rubicon-post. */
  .r-byline {
    font-family:
      "adobe-jenson-pro", "Iowan Old Style", "Palatino Linotype", Palatino,
      "Book Antiqua", Georgia, serif;
    font-style: italic;
    text-align: left !important; /* beat the legacy Code Injection ".rubicon-post .r-byline{text-align:center}" */
    font-size: 35px;
    color: #8a8a85;
    margin: -0.1em 0 0.9em;
  }
  /* A standalone byline card spans the full content column, so it lands further left than the
     66ch body. Pin it to the reading measure and centre it so its left edge lines up with the
     title/body. (A byline nested inside .rubicon-post already inherits the measure — untouched.) */
  .gh-content > .r-byline {
    width: 100%; /* WITHOUT this, auto margins on a .gh-canvas grid item shrink-wrap the box to the text and centre it */
    max-width: 660px; /* ≈ the .rubicon-post 66ch measure */
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
    box-sizing: border-box;
  }

  /* epigraph, set to the right */
  .rubicon-post .r-epigraph {
    margin: 1.4em 0 0 40%;
    text-align: right;
    font-family: var(--r-body);
    font-style: italic;
    font-size: 16.5px;
    line-height: 1.5;
    color: var(--r-ink);
  }
  .rubicon-post .r-epigraph-attr {
    margin: 0.7em 0 2em 40%;
    text-align: right;
    font-variant: small-caps;
    letter-spacing: 0.04em;
    color: var(--r-muted);
  }

  /* body — justified, hyphenated, gap-separated block paragraphs, drop cap, small-caps opener */
  .rubicon-post .r-body {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    hanging-punctuation: first last;
  }
  .rubicon-post .r-body > p {
    margin: 0 0 1.3em;
    text-indent: 0;
  }
  .rubicon-post .r-body > p:first-child {
    text-indent: 0;
    hyphens: none;
    -webkit-hyphens: none;
  }
  .rubicon-post .r-body > p:first-child::first-line {
    font-variant: small-caps;
    letter-spacing: 0.02em;
  }

  /* Drop cap — one style shared by the writer's manual .r-dropcap span (opening + section
     starts) AND the automatic first-letter for articles with no span. The :has() guard stops
     the two from doubling up when a paragraph already carries a manual drop cap. */
  .rubicon-post .r-dropcap,
  .rubicon-post .r-body > .r-break + p:not(:has(.r-dropcap))::first-letter,
  .rubicon-post .r-body > p:first-child:not(:has(.r-dropcap))::first-letter {
    float: left;
    font-family: var(--r-title);
    font-weight: 600;
    font-style: normal; /* upright even when the section opens inside an <em> */
    line-height: 0.72;
    padding: 0.02em 0.1em 0 0;
    color: var(--r-oxblood);
  }
  /* section-break drop caps ≈ 3 lines — a manual .r-dropcap span OR, automatically,
     the first letter of the paragraph right after any .r-break divider */
  .rubicon-post .r-body > p:not(:first-child) .r-dropcap,
  .rubicon-post .r-body > .r-break + p:not(:has(.r-dropcap))::first-letter {
    font-size: 5.4em;
  }
  /* opening drop cap ≈ 4 lines (manual span or automatic) */
  .rubicon-post .r-body > p:first-child .r-dropcap,
  .rubicon-post .r-body > p:first-child:not(:has(.r-dropcap))::first-letter {
    font-size: 7.2em;
  }
  .rubicon-post .r-body > p:has(.r-dropcap) {
    text-indent: 0;
  }
  .rubicon-post .r-body > p:not(:first-child):has(.r-dropcap) {
    margin-top: 2.4em;
  }

  /* Continuation block: add class="r-body r-cont" to the SECOND half when an article
     is split across a Public-preview divider, so the members-only half doesn't restart
     with an opening drop cap + small-caps first line. Higher specificity (extra .r-cont)
     overrides the first-child opening treatment above. A manual .r-dropcap span still
     works if a real section break happens to fall first in the continuation. */
  .rubicon-post .r-body.r-cont > p:first-child::first-line {
    font-variant: normal;
    letter-spacing: 0;
  }
  .rubicon-post
    .r-body.r-cont
    > p:first-child:not(:has(.r-dropcap))::first-letter {
    float: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    margin: 0;
    padding: 0;
    color: inherit;
  }

  /* ready-to-use extras (apply when the article marks them) */
  .rubicon-post .r-break {
    text-align: center;
    margin: 2em 0;
    color: var(--r-oxblood);
    font-size: 22px;
    letter-spacing: 0.4em;
    text-indent: 0;
  }
  /* Block quotes — styled automatically for the editor's NATIVE <blockquote> (what the quote
     button produces) as well as the manual .r-blockquote class, so nothing needs tagging.
     border/padding:0 clears Ghost's default blockquote rule/indent so it matches the design. */
  .gh-content blockquote,
  .rubicon-post .r-blockquote {
    margin: 1.6em 2.4em;
    font-size: 17.5px;
    line-height: 1.5;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    font-style: normal;
    color: #2a2521;
    border: 0;
    padding: 0;
  }
  .gh-content blockquote p,
  .rubicon-post .r-blockquote p {
    margin: 0;
    text-indent: 0;
  }
  .rubicon-post .r-pull {
    font-family: var(--r-title);
    font-style: italic;
    font-size: 26px;
    line-height: 1.3;
    color: var(--r-oxblood);
    text-align: center;
    text-wrap: balance;
    max-width: 24em;
    margin: 2.2em auto;
    padding: 0.7em 0;
    border-top: 1px solid var(--r-rule);
    border-bottom: 1px solid var(--r-rule);
    text-indent: 0;
  }
  .rubicon-post .r-subhead {
    font-family: var(--r-title);
    font-size: 24px;
    color: var(--r-muted);
    text-align: center;
    margin: 1.6em 0 1em;
    text-indent: 0;
  }

  @media (max-width: 600px) {
    .rubicon-post {
      font-size: 18px;
    }
    .rubicon-post .r-body {
      text-align: left;
      hyphens: none;
    }
    .rubicon-post .r-body > p {
      margin-bottom: 1em;
    }
    .rubicon-post .r-epigraph,
    .rubicon-post .r-epigraph-attr {
      margin-left: 0;
      text-align: left;
    }
    .rb-article-title {
      font-size: 32px;
    }
    .rubicon-post .r-byline {
      font-size: 35px;
    }
  }
