/* Caldiors Journal — article + static pages: one calm column, flat surfaces, sans headings. */
.journal-article {
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --col: 50rem;
  --wide: 72rem;
  background: var(--ivory);
}
.article-skip { position: fixed; top: 1rem; left: 1rem; z-index: 99; transform: translateY(-200%); padding: .8rem 1rem; border-radius: 6px; background: var(--blue); color: #fff; }
.article-skip:focus { transform: none; }
.journal-article a:focus-visible, .journal-article summary:focus-visible, .journal-article button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* ---------- Header ---------- */
.journal-article .article-wrap { padding: 0 var(--gutter); }
.ah { max-width: var(--wide); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.ah-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem;
  margin: 0 0 1.1rem;
  font: 500 .78rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.ah-kicker span { color: var(--ink); }
.ah-kicker time { letter-spacing: .02em; text-transform: none; font-size: .85rem; }
.ah-kicker span + time::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 .75rem 0 0; border-radius: 50%; background: currentColor; vertical-align: middle; }
.ah h1 {
  margin: 0;
  font: 500 clamp(2.2rem, 4.6vw, 3.7rem)/1.05 var(--sans);
  letter-spacing: -.04em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.ah-dek { max-width: 46rem; margin: 1.25rem 0 0; font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.55; color: var(--text); text-wrap: pretty; }
.ah-byline {
  display: flex; align-items: center; gap: .8rem;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(30, 27, 32, .14);
}
.ah-avatar { width: 40px; height: 40px; border-radius: 50%; }
.ah-author { display: grid; gap: .1rem; line-height: 1.3; }
.ah-author strong { font-size: .92rem; font-weight: 500; color: var(--ink); }
.ah-author span { font-size: .84rem; color: var(--muted); }
.ah-share { position: relative; display: flex; gap: .5rem; margin-left: auto; }
.ah-share-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(30, 27, 32, .2); border-radius: 6px;
  background: #fff; color: var(--ink); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.ah-share-btn:hover { border-color: var(--blue); color: var(--blue); }
.ah-share-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ah-copied { position: absolute; right: 0; top: calc(100% + .4rem); font-size: .75rem; color: var(--ink); white-space: nowrap; }

/* ---------- Cover ---------- */
.ah-cover { max-width: var(--wide); margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.journal-article .cover-img { display: block; aspect-ratio: 1672 / 941; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); box-shadow: none; }
.journal-article .cover-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Reading column ---------- */
.journal-article .article-layout {
  display: block;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0;
  scroll-margin-top: 4rem;
}
.journal-article .toc {
  position: static;
  margin: 0 0 2.5rem;
  padding: 0;
  border: 1px solid rgba(30, 27, 32, .14);
  border-radius: 8px;
  background: #fff;
  font-size: .95rem;
}
.journal-article .toc summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  list-style: none; cursor: pointer;
  font: 500 .95rem var(--sans); color: var(--ink);
}
.journal-article .toc summary::-webkit-details-marker { display: none; }
.journal-article .toc summary span { width: 9px; height: 9px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.journal-article .toc[open] summary span { transform: rotate(-135deg) translateY(-2px); }
.journal-article .toc ol { list-style: none; margin: 0; padding: .25rem 1.25rem 1rem; border: 0; border-top: 1px solid rgba(30, 27, 32, .1); }
.journal-article .toc li a {
  display: grid; grid-template-columns: 1.75rem 1fr; gap: .25rem;
  padding: .55rem 0; margin: 0; border: 0;
  line-height: 1.45; color: var(--text); text-decoration: none;
}
.journal-article .toc li a span { font-size: .8rem; color: #8E8C90; padding-top: .12rem; }
.journal-article .toc li a:hover, .journal-article .toc li a.active { color: var(--blue); }
.journal-article .toc li a.active span { color: var(--blue); }

.journal-article .prose { font-size: clamp(1.05rem, 1.15vw, 1.15rem); line-height: 1.75; color: var(--ink); }
.journal-article .prose > p:first-of-type { font-size: clamp(1.18rem, 1.45vw, 1.32rem); line-height: 1.6; color: var(--ink); }
.journal-article .prose > p:first-of-type::first-letter { all: unset; }
.journal-article .prose p { margin: 0 0 1.4rem; }
.journal-article .prose h2 {
  display: block;
  margin: 3rem 0 1rem; padding: 0; border: 0;
  font: 500 clamp(1.5rem, 2.3vw, 1.95rem)/1.15 var(--sans);
  letter-spacing: -.03em; color: var(--ink);
  text-wrap: balance;
  scroll-margin-top: 5rem;
}
.journal-article .prose a { color: var(--blue); text-decoration-color: rgba(0, 0, 201, .35); text-underline-offset: 3px; }
.journal-article .prose a:hover { text-decoration-color: var(--blue); }
.article-end {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 3rem 0 1.25rem; padding: 1.1rem 0;
  border-top: 1px solid rgba(30, 27, 32, .14); border-bottom: 1px solid rgba(30, 27, 32, .14);
  font-size: .9rem;
}
.journal-article .prose .article-end a { color: var(--ink); text-decoration: none; }
.journal-article .prose .article-end a:hover { color: var(--blue); }
.journal-article .prose .note { margin: 0; padding: 0; border: 0; font-size: .85rem; line-height: 1.65; color: var(--muted); }

/* Navbar and footer share the article's edges, so everything lines up with the cover */
.journal-article .site-header.home-bar .inner { max-width: calc(var(--wide) + 2 * var(--gutter)); }

/* Desktop header: big title left; intro, author and share bottom-aligned on the right */
@media (min-width: 1080px) {
  .journal-article:not(.static-page) .ah {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(2.5rem, 5vw, 5rem);
    padding: clamp(3rem, 5.5vw, 4.5rem) 0 clamp(2.25rem, 3.5vw, 3rem);
  }
  .journal-article:not(.static-page) .ah-kicker { grid-column: 1 / -1; margin-bottom: 1.4rem; }
  .journal-article:not(.static-page) .ah h1 {
    grid-column: 1; grid-row: 2 / 4; align-self: end;
    max-width: none;
    font-size: clamp(2.4rem, 3.6vw, 3.25rem);
    text-wrap: pretty; /* fill the column; 'balance' left it half empty */
  }
  .journal-article:not(.static-page) .ah-dek { grid-column: 2; grid-row: 2; align-self: end; max-width: none; margin: 0; font-size: 1.06rem; line-height: 1.6; }
  .journal-article:not(.static-page) .ah-byline { grid-column: 2; grid-row: 3; margin-top: 1.5rem; padding-top: 1.25rem; }
}

/* Desktop: contents rail on the left, text column beside it — no empty side margins */
@media (min-width: 1080px) {
  .journal-article:not(.static-page) .article-layout {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--col));
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
    max-width: var(--wide);
  }
  .journal-article:not(.static-page) .article-layout > .prose { grid-column: 2; }
  .journal-article:not(.static-page) .toc {
    grid-column: 1;
    position: sticky; top: 5.5rem;
    margin: 0; border: 0; border-radius: 0; background: none;
  }
  .journal-article:not(.static-page) .toc summary {
    padding: 0 0 .9rem; pointer-events: none;
    font: 500 .78rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  }
  .journal-article:not(.static-page) .toc summary span { display: none; }
  .journal-article:not(.static-page) .toc ol { padding: .35rem 0 0; border-top: 1px solid rgba(30, 27, 32, .14); }
  .journal-article:not(.static-page) .toc li a { padding: .5rem 0; font-size: .92rem; }
  .journal-article:not(.static-page) .prose { font-size: clamp(1.08rem, 1.2vw, 1.2rem); }
}

/* ---------- Signup + related ---------- */
.article-signup { max-width: var(--wide); margin: clamp(3.5rem, 7vw, 5rem) auto 0; padding: 0 var(--gutter); }
.article-signup .offer-card { max-width: none; }
.journal-article .related { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(3.5rem, 7vw, 5rem) var(--gutter); background: transparent; border: 0; }
.journal-article .related-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; max-width: none; margin: 0 0 2rem; padding: 0; }
.journal-article .related-head h2 { margin: .6rem 0 0; font: 500 clamp(1.7rem, 2.8vw, 2.4rem)/1.1 var(--sans); letter-spacing: -.035em; color: var(--ink); }
.journal-article .related-head > a { padding-bottom: .15rem; border-bottom: 1px solid currentColor; font-size: .92rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); text-decoration: none; }
.journal-article .related-head > a:hover { color: var(--blue); }
.journal-article .related .post-grid { max-width: none; padding-inline: 0; }

/* ---------- Guide components ---------- */
.journal-article .prose .checklist { list-style: none; margin: 0 0 1.6rem; padding: .6rem 1.25rem; border: 1px solid rgba(30, 27, 32, .14); border-radius: 8px; background: #fff; }
.journal-article .prose .checklist li { position: relative; padding: .6rem 0 .6rem 1.9rem; line-height: 1.55; border-bottom: 1px solid rgba(30, 27, 32, .1); }
.journal-article .prose .checklist li:last-child { border-bottom: 0; }
.journal-article .prose .checklist li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 1.05rem; height: 1.05rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230000C9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

.journal-article .prose .quick-answer { margin: 0 0 2.2rem; padding: 1.35rem 1.5rem 1.4rem; border-radius: 8px; background: var(--paper); border-left: 3px solid var(--blue); }
.journal-article .prose .quick-answer .qa-label { margin: 0 0 .5rem; font: 500 .74rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.journal-article .prose .quick-answer p:last-child { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ink); }

/* ---------- Static pages (About, Contact, Privacy): wide header, editorial two-column body ---------- */
.static-page .ah, .static-page .article-layout { max-width: var(--wide); }
.static-page .ah h1 { max-width: 16ch; }
.static-page .ah-dek { max-width: 40rem; }
.static-page .prose > p { max-width: 44rem; }
.sp-row {
  display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: 1rem clamp(2rem, 5vw, 5rem);
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-top: 1px solid rgba(30, 27, 32, .14);
}
.static-page .prose > p + .sp-row { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.journal-article .prose .sp-row > h2 { margin: 0; font-size: clamp(1.3rem, 1.9vw, 1.65rem); }
.sp-body { max-width: 44rem; }
.sp-body > :last-child { margin-bottom: 0; }

/* About: title panel beside a photo, like the homepage story block */
.page-about .ah-kicker time { display: none; }
.page-about .cover-img img { object-position: 50% 30%; }
@media (min-width: 900px) {
  .page-about .article-wrap {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(.75rem, 1.4vw, 1.25rem);
    max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto;
    padding-top: clamp(1.25rem, 2.5vw, 2rem);
  }
  .page-about .ah {
    grid-column: 1; max-width: none; margin: 0;
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(2rem, 5vw, 5rem);
    border-radius: 6px; background: var(--paper);
  }
  .page-about .ah-cover { grid-column: 2; max-width: none; margin: 0; }
  .page-about .cover-img { height: 100%; min-height: 30rem; aspect-ratio: auto; border-radius: 6px; }
  .page-about .article-layout { grid-column: 1 / -1; margin-top: clamp(3rem, 6vw, 5rem); }
}
@media (max-width: 899px) {
  .page-about .cover-img { aspect-ratio: 4 / 3; }
}

@media (max-width: 860px) { .sp-row { grid-template-columns: 1fr; gap: .9rem; } }
@media (max-width: 620px) {
  .ah-byline { flex-wrap: wrap; }
  .ah-kicker time { font-size: .8rem; }
  .article-end { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .journal-article * { animation: none !important; transition: none !important; } }
