/* Writing posts only (src/pages/writing/[id].astro): the share row on every post, and for interviews the
   company logo, guests, sources, hero plate, and tables and diagrams redrawn from screenshots.
   Kept out of the shared stylesheet budget. */
.wr-share { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 14px; }
.wr-share .k { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wr-share ul { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.wr-share a, .wr-share button { font: 500 12px var(--mono); letter-spacing: .04em; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.wr-share a:hover, .wr-share button:hover { color: var(--accent); text-decoration-color: currentColor; }
.wr-share.is-foot { margin-top: 28px; padding-top: 12px; border-top: 1.5px solid var(--ink); }

/* The piece's mark: the one-line drawing of the first thesis it argues, else of a motif read
   from its reference entries. It takes the head's third column; on an interview the company's
   own logo keeps the far corner beside it. Sized for the head, not the index's 300px column. */
.wr-art { display: block; width: 112px; height: auto; align-self: start; justify-self: end; margin-top: 2px; }
/* An interview's head already has the company's mark in the corner, so the drawing drops to
   the line below it rather than crowding the title into a fourth column. */
.hs-th-head:has(.wr-company) .wr-art { grid-column: 1 / -1; width: 88px; margin-top: -10px; }

/* The logo takes the head's third column, top right, at the height of the title's cap line.
   It is the company's own mark on the linen, never recoloured or boxed. */
.wr-company { align-self: start; display: block; margin-top: 6px; line-height: 0; }
.wr-company img { display: block; height: 44px; width: auto; max-width: 168px; object-fit: contain; }
/* A mark drawn for a dark header (pale type) sits on an ink tab rather than being recoloured. */
.wr-company.is-dark { background: #1E1B18; padding: 6px 10px; }
.wr-company.is-dark img { height: 32px; }
/* In the dark shell a company's own dark-ink mark sits on a linen tab rather than being recoloured. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wr-company:not(.is-dark) { background: #F5F1E6; padding: 6px 10px; } :root:not([data-theme="light"]) .wr-company:not(.is-dark) img { height: 32px; } }
:root[data-theme="dark"] .wr-company:not(.is-dark) { background: #F5F1E6; padding: 6px 10px; }
:root[data-theme="dark"] .wr-company:not(.is-dark) img { height: 32px; }
@media (max-width: 760px) {
  .hs-th-head:has(.wr-company) { grid-template-columns: minmax(0, 1fr) auto; }
  .hs-th-head:has(.wr-company) .hs-th-no { grid-column: 1; }
  .hs-th-head:has(.wr-company) .wr-company { grid-column: 2; grid-row: 1; margin-top: 0; }
  .hs-th-head:has(.wr-company) .hs-th-title { grid-column: 1 / -1; }
  .wr-company img { height: 32px; max-width: 128px; }
  /* One column at this width, so the drawing sits on the format line rather than below the title. */
  .hs-th-head:has(.wr-art) { grid-template-columns: minmax(0, 1fr) auto; }
  .hs-th-head:has(.wr-art) .hs-th-no { grid-column: 1; grid-row: 1; }
  .hs-th-head:has(.wr-art) .wr-art { grid-column: 2; grid-row: 1; width: 76px; margin-top: -6px; }
  .hs-th-head:has(.wr-art) .hs-th-title { grid-column: 1 / -1; grid-row: 2; }
  /* Both marks: the drawing keeps the corner, the company's own mark goes under the title. */
  .hs-th-head:has(.wr-art):has(.wr-company) .wr-company { grid-column: 1; grid-row: 3; margin-top: 4px; }
}


.wr-sources { margin-top: 36px; }
.wr-sources h2 { font: 600 20px/1.2 var(--display); font-variation-settings: "SOFT" 100; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.wr-sources ol { margin: 0; padding: 0 0 0 1.4em; font-size: 14.5px; line-height: 1.5; }
.wr-sources li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.wr-sources .why { color: var(--muted); }

.margin .wr-guests li { align-items: baseline; }
.margin .wr-guests b { font-weight: 600; }
.margin .wr-guests .m { display: block; color: var(--muted); }

/* Interview lead image: the computed plate (scripts/interview_heroes), no frame of its own. */
.wr-body figure.wr-hero { margin: 0 0 24px; }
.wr-body figure.wr-hero img { border: 0; width: 100%; }

.wr-body figure.wr-table { margin: 24px 0; }
.wr-table table { margin: 0; font-size: 14px; line-height: 1.4; }
.wr-table caption { caption-side: top; text-align: left; font-family: var(--display); font-size: 1.05rem; color: var(--ink); padding-bottom: 8px; }
.wr-table tbody th { font-family: var(--sans); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); border-bottom: 1px solid var(--line); }
.wr-table tr.is-subject th, .wr-table tr.is-subject td { background: var(--accent-soft); }
.wr-table tr.is-subject th { box-shadow: inset 3px 0 0 var(--accent); padding-left: 8px; }
.wr-table td ul { list-style: none; margin: 0; padding: 0; }
.wr-table td li { margin: 0 0 2px; }
.wr-table td li.is-subject { color: var(--accent); font-weight: 600; }
.wr-table th[scope="rowgroup"] { font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--ink); }
.wr-dots { display: inline-flex; gap: 2px; vertical-align: -1px; }
.wr-dots i { width: 8px; height: 8px; border: 1px solid var(--ink); }
.wr-dots i.on { background: var(--ink); }
.wr-word { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.wr-plate { border-top: 1.5px solid var(--ink); padding-top: 10px; }
.wr-plate-title { font-family: var(--display); font-size: 1.05rem; margin: 0 0 12px; }
.wr-plate .k { margin: 0 0 6px; }
.wr-box { border: 1px solid var(--graphite); background: var(--surface); padding: 10px 12px; margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.wr-box > b { display: block; font-weight: 600; margin-bottom: 8px; }
.wr-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.wr-parts span { flex: 1 1 8rem; border: 1px solid var(--line); background: var(--ground, var(--bg)); padding: 6px 8px; font-size: 13px; }
.wr-parts span.is-subject { border-color: var(--accent); color: var(--accent); }
.wr-os { margin-top: 6px; border: 1px dashed var(--graphite); padding: 5px 8px; font-family: var(--mono); font-size: 12px; text-align: center; }
.wr-thin { font-family: var(--mono); font-size: 12px; padding: 6px 10px; }
.wr-base { text-align: center; font-family: var(--mono); font-size: 12px; background: var(--sunk); }
.wr-worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wr-world.is-subject .wr-box:first-of-type { border-color: var(--accent); }
.wr-world.is-subject .k { color: var(--accent); }
.wr-layers { display: grid; gap: 4px; }
.wr-layer { display: grid; grid-template-columns: 11rem 1fr; gap: 12px; align-items: start; }
.wr-layer .k { padding-top: 11px; }
@media (max-width: 640px) {
  .wr-worlds, .wr-layer { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .wr-layer .k { padding-top: 6px; }
}

/* One centred reading column, like the Substack (Lawrence, 17 Nov 2026): no margin column beside
   the text. The head, the text and what follows the piece share one measure; figures run a little
   wider than the text on a wide screen. */
.hs-entry .entry { display: block; max-width: 700px; margin: 0 auto; }
.hs-entry .entry-head { margin-bottom: 32px; }
.hs-entry .entry-head h1 { max-width: none; }
.hs-entry .wr-body > p, .hs-entry .wr-body li { font-size: 18px; line-height: 1.7; }
.hs-entry .wr-body > p:first-child { font-size: 20px; line-height: 1.55; }
@media (min-width: 900px) {
  .hs-entry .wr-body figure { margin: 32px -60px; }
}
.hs-entry .margin.wr-after { position: static; max-height: none; overflow: visible; margin-top: 40px; font-size: 14px; }
