/* ============================================================
   CRAIG STANLEY STUDIO — writing / blog
   Extends brand.css. No new colours. No icons. No gradients.
   Square, aligned, one red.
   ============================================================ */

/* --- the feed --------------------------------------------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 40px;
}

a.post-row {
  border: 2px solid var(--ink);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 22px 24px;
  transition: background .1s;
}
a.post-row:hover { background: var(--white); }
a.post-row:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }

.pl-num {
  font-size: 32px;
  font-weight: 800;
  line-height: .9;
  color: var(--grey);
}
a.post-row:hover .pl-num { color: var(--red); }

.pl-main { display: block; }
.pl-title {
  display: block;
  font-size: 19px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.12;
}
.pl-stand {
  display: block;
  font-size: 14px;
  color: var(--grey);
  line-height: 1.55;
  margin-top: 7px;
  max-width: 62ch;
}
.pl-tags { display: block; margin-top: 11px; }
.pl-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1px solid var(--grey);
  color: var(--grey);
  padding: 2px 8px;
  margin-right: 4px;
}

.pl-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
  white-space: nowrap;
}
.pl-meta .cs-label { font-size: 10px; color: var(--grey); }

/* filter chips — buttons styled as .sn-item */
.blog-filters { gap: 5px; }
.blog-filters button.sn-item {
  font-family: var(--sans);
  background: var(--paper);
  cursor: pointer;
}
.blog-filters button.sn-item:hover,
.blog-filters button.sn-item.active {
  background: var(--ink);
  color: var(--paper);
}
.blog-filters button.sn-item.active { border-color: var(--ink); }

.blog-note {
  border-top: 4px solid var(--ink);
  padding-top: 18px;
  margin-bottom: 48px;
  font-size: 13px;
  color: var(--grey);
  max-width: 62ch;
  line-height: 1.6;
}

/* --- post page -------------------------------------------- */
.post-hero { border-bottom: 4px solid var(--ink); }
.post-title {
  font-size: clamp(38px, 6.2vw, 76px);
  max-width: 20ch;
}
.post-standfirst {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 56ch;
  margin-top: 22px;
  font-weight: 400;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  margin-top: 26px;
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}
.post-meta .cs-label { font-size: 11px; color: var(--grey); }

/* body copy — measure is the whole design */
.prose.post-body {
  max-width: 66ch;
  padding: 40px 0 16px;
}
.post-body p { font-size: 17px; line-height: 1.7; margin-bottom: 22px; }
.post-body h2 {
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin: 46px 0 16px;
  padding-top: 22px;
  border-top: 4px solid var(--ink);
}
.post-body h3 {
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 30px 0 10px;
}
.post-body ul, .post-body ol { margin: 0 0 22px 22px; }
.post-body li { font-size: 17px; line-height: 1.65; margin-bottom: 9px; }
.post-body strong { font-weight: 700; }
.post-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--red);
}
.post-body a:hover { color: var(--red); }
.post-body blockquote {
  border-left: 4px solid var(--red);
  padding: 4px 0 4px 20px;
  margin: 0 0 22px;
  color: var(--ink);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 26px;
  font-variant-numeric: tabular-nums;
}
.post-body th, .post-body td {
  border: 2px solid var(--ink);
  padding: 10px 13px;
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: top;
}
.post-body th {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  background: var(--ink);
  color: var(--paper);
}
.post-body code {
  font-family: var(--sans);
  font-weight: 700;
  border: 1px solid var(--grey);
  padding: 1px 5px;
  font-size: .92em;
}

/* signature block — the red box every piece carries */
.post-sign {
  border: 2px solid var(--ink);
  border-left: 14px solid var(--red);
  background: var(--white);
  padding: 22px 26px;
  max-width: 66ch;
  margin: 20px 0 32px;
}
.post-sign p {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 58ch;
}

.post-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 28px;
}
.post-tags .cs-label { font-size: 10px; }

.post-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 4px solid var(--ink);
  padding: 24px 0 52px;
}
.post-nav .cs-btn { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- responsive ------------------------------------------- */
@media (max-width: 900px) {
  a.post-row { grid-template-columns: 52px 1fr; gap: 16px; padding: 18px 18px; }
  .pl-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    margin-top: 12px;
  }
  .pl-num { font-size: 24px; }
  .prose.post-body { max-width: 100%; }
  .post-sign { max-width: 100%; }
}
@media (max-width: 600px) {
  .pl-title { font-size: 16px; }
  .pl-stand { font-size: 13px; }
  .post-standfirst { font-size: 17px; }
  .post-body p, .post-body li { font-size: 16px; }
  .post-nav .cs-btn { max-width: 100%; }
}

@media print {
  .site-header, .post-nav, .blog-filters, .site-footer { display: none; }
  .prose.post-body { max-width: 100%; }
  .post-body a { text-decoration: none; }
  .post-body a::after { content: " (" attr(href) ")"; font-size: 11px; color: #555; }
}

/* Visually hidden, still announced. Used by the filter status region so a
   screen reader hears how many pieces survived the filter — sighted users
   get that from the rows disappearing. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
