/* Cowen Copy – Journal styles (extends /styles.css). Used by the homepage, /blog/ and posts. */


nav a[aria-current="page"] { color: var(--orange-text); }

/* ---------- Blog home ---------- */
.blog-head { padding-top: clamp(56px, 9vw, 110px); padding-bottom: 40px; }
.blog-head h1 { font-size: clamp(46px, 7vw, 84px); margin-bottom: 18px; }
.blog-head .lede { margin-bottom: 0; }

.blog-tools { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 18px 0; margin-bottom: 48px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
  font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  padding: 10px 14px; cursor: pointer;
}
.chip[aria-pressed="true"], .chip:hover { background: var(--ink); color: var(--white); }
.search { position: relative; flex: 0 1 280px; }
.search input {
  width: 100%; font: 400 15px var(--sans); padding: 11px 14px 11px 38px;
  border: 1px solid var(--rule); background: var(--white); color: var(--ink);
}
.search input:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: transparent; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--grey); }

/* Featured */
.featured { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: 72px; text-decoration: none; }
.featured .cover { aspect-ratio: 4 / 3; }
.featured h2 { font-size: clamp(34px, 4.4vw, 52px); margin: 12px 0 16px; }
.featured:hover h2 { color: var(--orange-text); }

/* Covers: typographic, brand colours, no stock photos */
.cover { position: relative; overflow: hidden; display: grid; place-items: center; padding: 8%; text-align: center; }
.cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--orange); }
.cover--ink { background: var(--ink); color: var(--white); }
.cover--stone { background: var(--stone); color: var(--ink); }
.cover--peach { background: #f6dfcf; color: #7a3410; }
.cover--photo { background: #ddd5cb center 30% / cover no-repeat; }
.cover-word { font: italic 500 clamp(40px, 6vw, 88px)/1 var(--serif); }
.cover-small { font: 600 11px var(--sans); letter-spacing: .22em; text-transform: uppercase; margin-top: 14px; opacity: .8; }
.cover-strike { font: 500 clamp(22px, 2.6vw, 34px)/1.2 var(--serif); }
.cover-strike s { text-decoration-color: var(--orange); text-decoration-thickness: 3px; opacity: .55; }
.cover-quote { font: 500 clamp(26px, 3vw, 40px)/1.15 var(--serif); }

.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }
.meta .cat { color: var(--orange-text); }
.meta .dot::before { content: "·"; }

/* Grid of posts */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 36px; list-style: none; margin: 0; padding: 0; }
.card a { text-decoration: none; display: block; }
.card .cover { aspect-ratio: 4 / 3; margin-bottom: 20px; container-type: inline-size; }
.card .cover-word { font-size: clamp(34px, 17cqi, 64px); }
.card .cover-strike { font-size: clamp(18px, 8.5cqi, 30px); }
.card .cover-quote { font-size: clamp(22px, 11cqi, 38px); }
.card h3 { font-size: 27px; margin: 10px 0 10px; transition: color .2s; }
.card a:hover h3 { color: var(--orange-text); }
.card p { font-size: 15px; color: var(--grey); margin: 0; }
.card[hidden] { display: none; }
.no-results { color: var(--grey); text-align: center; padding: 40px 0; }

/* Newsletter */
.newsletter { background: var(--stone); padding: clamp(56px, 8vw, 96px) 0; margin-top: var(--section); }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.newsletter h2 { margin-bottom: 12px; }
.newsletter p { color: var(--grey); margin: 0; }
.signup { display: flex; gap: 0; }
.signup input { flex: 1; min-width: 0; font: 400 16px var(--sans); padding: 16px; border: 1px solid var(--ink); border-right: 0; background: var(--white); }
.signup .btn { padding: 16px 24px; border: 1px solid var(--orange); cursor: pointer; }
.signup-note { font-size: 12px; color: var(--grey); margin-top: 10px; }
.signup-ok { font-family: var(--serif); font-size: 24px; }

/* ---------- Article ---------- */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; background: var(--orange); z-index: 60; }

.article-head { padding: clamp(48px, 8vw, 96px) 0 36px; max-width: 860px; }
.crumbs { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 24px; }
.crumbs a { text-decoration: none; color: var(--grey); }
.crumbs a:hover { color: var(--orange-text); }
.article-head h1 { font-size: clamp(42px, 6.4vw, 76px); margin: 14px 0 22px; }
.standfirst { font: 500 clamp(21px, 2.3vw, 26px)/1.45 var(--serif); color: #3a3734; margin: 0 0 28px; }
.byline { display: flex; align-items: center; gap: 14px; }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center 22%; }
.byline b { display: block; font-size: 15px; }
.byline span { font-size: 13px; color: var(--grey); }

.article-cover { aspect-ratio: 21 / 9; margin-bottom: 56px; }

.article-layout { display: grid; grid-template-columns: 64px minmax(0, 680px) 1fr; gap: 0 48px; align-items: start; }

/* Share rail */
.share-rail { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 10px; }
.share-rail .share-label { font: 600 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--grey); writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto 8px; }
.share-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--rule); background: var(--white); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: all .2s; padding: 0;
}
.share-btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.share-btn svg { width: 18px; height: 18px; }
.share-btn.copied { background: var(--orange); border-color: var(--orange); color: var(--white); }

/* Body */
.prose { font-size: 18px; line-height: 1.8; }
.prose h2 { font-size: clamp(30px, 3.2vw, 38px); margin: 56px 0 16px; scroll-margin-top: 110px; }
.prose p { margin: 0 0 1.25em; }
.prose a { color: var(--orange-text); }

.tldr { background: var(--stone); padding: 26px 30px; margin: 0 0 44px; border-left: 4px solid var(--orange); }
.tldr h2 { font: 600 12px var(--sans) !important; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 12px !important; color: var(--orange-text); }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { margin: 4px 0; font-size: 17px; }

.listen { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 36px; background: none; border: 1px solid var(--ink);
  padding: 10px 18px 10px 12px; font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; color: var(--ink); }
.listen .play { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; }
.listen .play svg { width: 10px; height: 10px; }
.listen[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.listen[aria-pressed="true"] .play { background: var(--orange); }

.pullquote { margin: 48px 0; padding: 0; border: 0; }
.pullquote p { font: italic 500 clamp(28px, 3.4vw, 38px)/1.25 var(--serif); margin: 0 0 14px; }
.pullquote footer { display: flex; align-items: center; gap: 12px; }
.pullquote .tweetable { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 2px; cursor: pointer; color: var(--orange-text); }

.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 40px 0; border: 1px solid var(--rule); }
.before-after > div { padding: 24px 26px; }
.before-after .ba-before { background: #faf8f5; }
.before-after .ba-after { background: var(--ink); color: var(--white); }
.ba-label { font: 600 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; display: block; }
.ba-before .ba-label { color: var(--grey); }
.ba-after .ba-label { color: var(--orange-dark); }
.ba-before p { color: var(--grey); font-size: 17px; margin: 0; }
.ba-after p { font: 500 24px/1.35 var(--serif); margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 48px 0 0; }
.tags a { font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; background: var(--stone); padding: 8px 12px; color: var(--ink); }

.share-end { margin: 48px 0 0; padding: 28px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.share-end h2 { font: 600 12px var(--sans) !important; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 14px !important; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }

.author-card { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: center; margin: 48px 0 0; }
.author-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 22%; }
.author-card h2 { font-size: 28px !important; margin: 0 0 6px !important; }
.author-card p { font-size: 16px; color: var(--grey); margin: 0 0 8px; }

/* TOC */
.toc { position: sticky; top: 130px; font-size: 14px; }
.toc h2 { font: 600 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--grey); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--grey); line-height: 1.4; }
.toc a.active { color: var(--ink); border-left-color: var(--orange); font-weight: 600; }

/* Highlight-to-share popover */
.hl-pop { position: absolute; z-index: 70; display: none; background: var(--ink); padding: 4px; gap: 2px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.hl-pop.show { display: flex; }
.hl-pop button { background: none; border: 0; color: var(--white); width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.hl-pop button:hover { color: var(--orange-dark); }
.hl-pop svg { width: 16px; height: 16px; }
.hl-pop::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 0; border-top-color: var(--ink); }

/* Related */
.related { margin-top: var(--section); }
.related .posts { margin-top: 32px; }

/* Mobile share bar */
.share-bar { display: none; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: var(--ink); color: var(--white);
  font-size: 14px; padding: 12px 18px; opacity: 0; transition: all .25s; z-index: 80; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 64px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 960px) {
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .newsletter-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .article-layout { grid-template-columns: 1fr; }
  .share-rail { display: none; }
  .share-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: rgba(255,255,255,.97); border-top: 1px solid var(--rule); padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    gap: 8px; align-items: center; justify-content: space-between;
  }
  .share-bar .share-label { font: 600 10px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }
  .share-bar .share-row { flex-wrap: nowrap; gap: 6px; }
  .share-bar .share-btn { width: 40px; height: 40px; }
  body.has-share-bar { padding-bottom: 64px; }
  .article-cover { aspect-ratio: 4 / 3; margin-bottom: 36px; }
  .before-after { grid-template-columns: 1fr; }
  .blog-tools { flex-direction: column; align-items: stretch; }
  .search { flex-basis: auto; }
  .blog-tools > * { min-width: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100% + var(--gutter) * 2); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .chip { white-space: nowrap; }
  .signup { flex-direction: column; gap: 10px; }
  .signup input { border-right: 1px solid var(--ink); }
}
@media (max-width: 600px) {
  .posts { grid-template-columns: 1fr; }
  .author-card { grid-template-columns: 64px 1fr; gap: 16px; }
  .author-card img { width: 64px; height: 64px; }
}

/* ---------- Journal before the first post ---------- */
    .empty-journal { position: relative; border-top: 1px solid var(--rule); padding-top: 48px; }
    .ghosts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 36px; list-style: none; margin: 0; padding: 0; opacity: .55; }
    .ghost-cover { aspect-ratio: 4/3; border: 1px dashed #cfc5b9; display: grid; place-items: center; margin-bottom: 20px; background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(188,84,24,.05) 14px 15px); }
    .ghost-cover span { font: 600 11px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--grey); }
    .ghosts i { display: block; height: 14px; background: var(--stone); margin: 10px 0; }
    .ghosts i.short { width: 60%; }
    .empty-msg { position: relative; max-width: 620px; margin: -120px auto 0; background: var(--white); padding: 40px 44px; text-align: center; box-shadow: 0 20px 60px rgba(17,17,17,.08); border-bottom: 6px solid var(--orange); }
    .empty-msg h2 { font-size: clamp(32px, 4vw, 46px); }
    .empty-msg em { font-style: italic; }
    .empty-msg p { color: var(--grey); }
    .empty-follow { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; align-items: baseline; margin: 24px 0 0; font-size: 14px; }
    @media (max-width: 720px) {
      .ghosts { grid-template-columns: 1fr; } .ghosts li:nth-child(n+2) { display: none; }
      .empty-msg { margin-top: -90px; padding: 30px 22px; }
    }

/* ---------- Homepage Journal section ---------- */
    .home-journal { padding: var(--section) 0; }
    .hj-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 48px; }
    .hj-head h2 { margin: 0; }
    .hj-head em { font-style: italic; }
    .hj-news { margin-top: 64px; padding: 28px 32px; background: var(--stone); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; border-bottom: 6px solid var(--orange); }
    .hj-news p { margin: 0; font-size: 17px; flex: 1 1 280px; }
    .hj-form .btn { border: 0; cursor: pointer; }
    .hj-form { display: flex; gap: 10px; flex: 0 1 420px; min-width: 0; }
    .hj-form input { flex: 1; min-width: 0; font: 400 15px var(--sans); padding: 12px 14px; border: 1px solid var(--rule); background: var(--white); color: var(--ink); }
    .hj-soon { display: grid; grid-template-columns: 7fr 5fr; gap: 32px 64px; align-items: center; background: var(--stone); padding: clamp(32px, 5vw, 56px); border-bottom: 6px solid var(--orange); }
    .hj-soon h2 { margin-bottom: 12px; } .hj-soon em { font-style: italic; } .hj-soon p { margin: 0; color: var(--grey); }
    .hj-soon .hj-form { flex: none; }
    .hj-note { font-size: 13px; margin-top: 10px !important; }
    @media (max-width: 860px) { .hj-soon { grid-template-columns: 1fr; } }
    .home-journal + .contact { border-top: 1px solid var(--rule); }
    @media (max-width: 720px) { .hj-news { padding: 24px 20px; } .hj-form { flex-basis: 100%; flex-direction: column; } }
.hj-soon .empty-follow { justify-content: flex-start; margin-top: 18px; }

/* Newsletter forms only exist once a provider is set (see _app/config.php) */
.signup button, .hj-form button { font-family: var(--sans); }

/* Images in posts */
.prose figure { margin: 40px 0; }
.prose figure img { width: auto; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.prose figcaption { font-size: 14px; color: var(--grey); margin-top: 10px; text-align: center; }
.prose h3 { font-size: 26px; margin: 40px 0 12px; }
.prose hr { border: 0; text-align: center; margin: 48px 0; }
.prose hr::after { content: "· · ·"; letter-spacing: .6em; color: var(--orange); font-size: 20px; }
.prose ul, .prose ol { padding-left: 26px; margin: 0 0 1.25em; }
.prose .tldr ul { margin: 0; }
