/* ==========================================================================
   prose.css — the blog posts and the legal pages, on the restyle (Oct 2026).

   Load after /assets/pks.css, which brings the tokens, fonts, header, buttons
   and footer. This file only sets the reading column: the post header, the
   body text, the pull quote, the steps box, the cover and the closing call.
   The class names are the ones every post already uses (and the /admin
   publisher writes), so a post moves across by swapping its stylesheets.

   ========================================================================== */

/* ── The post header ── */
.article-header {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font: 500 .76rem/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0;
}
.article-meta::before {
  content: "";
  flex: none;
  width: 56px;
  height: 13.5px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 3px / 100% 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 6px / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 9px / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 12px / 100% 1.5px no-repeat;
}
/* Post titles are long lines, so they read in sentence case (uppercase is for
   short headings only, Paul 2026-10-21). */
.article-header h1 {
  font: 900 clamp(2.4rem, 6.2vw, 4.4rem)/1 var(--display);
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}
.article-header .subtitle {
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 60ch;
}

/* The old gold bar becomes a hairline under the header. */
.article-divider {
  max-width: 820px;
  height: 0;
  margin: 28px auto 36px;
  border-top: 1px solid var(--line);
  width: calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px)));
}

/* ── Cover ── */
.article-cover {
  max-width: 900px;
  margin: 0 auto 44px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.article-cover img,
.article-cover svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.article-cover figcaption {
  font: 400 .78rem/1.6 var(--mono);
  color: var(--muted);
  margin-top: 10px;
}

/* ── The reading column ── */
.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px));
}
.article-body p,
.article-body li {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
}
.article-body p { margin: 0 0 1.35em; }
.article-body ul,
.article-body ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.article-body li { margin-bottom: .4em; }
.article-body li::marker { color: var(--gold-text); }
.article-body h2 {
  font: 900 clamp(1.8rem, 4vw, 2.4rem)/1.02 var(--display);
  text-transform: none;
  letter-spacing: 0;
  margin: 2.2em 0 .6em;
  padding-top: 18px;
  border-top: 4px solid var(--ink);
}
.article-body h3 {
  font: 800 1.45rem/1.1 var(--display);
  text-transform: none;
  letter-spacing: 0;
  margin: 1.8em 0 .5em;
}
.article-body strong { font-weight: 700; }
.article-body em { font-style: italic; }
.article-body a { color: var(--green); }
.article-body blockquote {
  margin: 2em 0;
  padding-left: 20px;
  border-left: 4px solid var(--gold);
  color: var(--muted);
}

/* The pull quote. */
.article-body .highlight {
  font: 600 1.35rem/1.45 var(--body);
  color: var(--ink);
  border-left: 4px solid var(--gold);
  padding: 4px 0 4px 22px;
  margin: 2.2em 0;
}

/* A worked list of steps. */
.article-body .steps {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  margin: 2em 0;
}
.article-body .steps p { margin-bottom: 1em; }
.article-body .steps p:last-child { margin-bottom: 0; }

/* Tables inside a post scroll on their own on a phone. */
.article-body table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1.5em 0; }
.article-body th, .article-body td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.article-body thead th { border-top: 0; font: 500 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.article-body .table-scroll { overflow-x: auto; }

/* ── The closing call: the post's one dark block ── */
.article-cta {
  max-width: 820px;
  margin: 0 auto 72px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.article-cta-box {
  background: var(--stage);
  color: var(--on-stage);
  border-radius: 22px;
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.article-cta-box h3 {
  font: 900 clamp(1.8rem, 4.5vw, 2.6rem)/1 var(--display);
  text-transform: uppercase;
  color: var(--on-stage);
  max-width: 22ch;
}
.article-cta-box p { color: var(--stage-muted); max-width: 52ch; }
.article-cta-box .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* A post's footer is a single line. */
body > footer { text-align: center; }
body > footer p { margin: 0; }
