/* Lumae Consulting: the articles, and the page that lists them.
   An article is set like a long read in a good journal: the text in a measure of about seventy
   characters, on the side the page starts from, with the room beside it left for the odd quotation.
   Photographs break out of the text across the whole column, two at a time stand side by side, and
   each carries its caption under it. Rules and air do the separating, as on every other page. */

/* ---------- the opening ---------- */
.art .phero h1 { font-size: clamp(2.3rem, 1.45rem + 3.1vw, 3.9rem); line-height: 1.08; max-width: 19ch; }
.art .phero .lede { max-width: 42ch; margin-block-start: 22px; }
.art .meta { margin-block-start: 26px; font-size: var(--fs-0); color: var(--soft); }
.art-sample { margin-block-start: 12px; font-size: var(--fs-0); }

/* the lead photograph, across the column like the bands on the other pages */
.art-lead { margin: 0; padding-block-start: clamp(40px, 5vw, 72px); }
.art-lead img, .fig img, .post-pic img { width: 100%; height: auto; object-fit: cover; background: var(--rule); }
.art-lead img { aspect-ratio: 21 / 9; }
.art-lead figcaption, .fig figcaption { margin-block-start: 14px; max-width: 56ch; font-size: var(--fs-0); line-height: 1.6; color: var(--soft); }

/* ---------- the text ----------
   Two columns: the measure, and the room beside it. Everything sits in the measure except the
   photographs and tables, which take both, and a quotation, which stands in the room beside the
   paragraph before it. */
.art-body {
  --measure: 40rem;
  display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); column-gap: clamp(40px, 6vw, 96px);
  margin-block-start: clamp(48px, 6vw, 88px);
  font-size: 1.125rem; line-height: 1.75;
}
:lang(ar) .art-body { --measure: 41rem; font-size: 1.1875rem; line-height: 1.95; }
.art-body > * { grid-column: 1; min-width: 0; }
.art-body > * + * { margin-block-start: 1.15em; }
.art-body > p:first-child { font-size: var(--fs-2); line-height: 1.62; }
:lang(ar) .art-body > p:first-child { line-height: 1.85; }

.art-body h2 {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.05rem); line-height: 1.18;
  margin-block-start: clamp(56px, 6vw, 84px); padding-block-start: clamp(26px, 3vw, 36px);
  border-block-start: 1.5px solid var(--rule);
}
:lang(ar) .art-body h2 { line-height: 1.5; }
.art-body h3 { font-family: var(--sans); font-weight: 600; font-size: 1.1875rem; line-height: 1.4; margin-block-start: 2.1em; }
.art-body :is(h2, h3) + * { margin-block-start: 0.7em; }

.art-body a { color: var(--blue-ink); }
.art-body strong { font-weight: 600; }
.art-body :is(ul, ol) { padding-inline-start: 1.25em; list-style: revert; }
.art-body li + li { margin-block-start: 0.45em; }
.art-body li { padding-inline-start: 0.35em; }
.art-body ul > li::marker { color: var(--faint); }
.art-body ol > li::marker { font-family: var(--serif); color: var(--soft); }

/* a quotation: in the measure on a narrow screen, in the room beside the text on a wide one */
.art-body blockquote { margin-inline: 0; margin-block: 1.6em 0.4em; padding-block-start: 20px; position: relative; font-family: var(--serif); font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.6rem); line-height: 1.42; color: var(--ink); }
:lang(ar) .art-body blockquote { line-height: 1.7; }
.art-body blockquote::before { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 44px; height: 1.5px; background: var(--blue); }
.art-body blockquote > * + * { margin-block-start: 0.6em; }

/* photographs: one breaks out across both columns, two or more stand side by side */
.art-body > :is(.fig, .figs) { grid-column: 1 / -1; margin-block: clamp(40px, 5vw, 72px) clamp(8px, 1vw, 16px); }
.art-body > :is(.fig, .figs) + * { margin-block-start: clamp(28px, 3vw, 44px); }
.fig { margin: 0; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(20px, 2.4vw, 36px); align-items: start; }
.figs .fig img { aspect-ratio: 4 / 3; }

/* a table: hairlines between the rows and nothing round it */
.art-body > table { grid-column: 1 / -1; max-width: 60rem; margin-block: 1.8em 0.4em; border-collapse: collapse; font-size: var(--fs-1); line-height: 1.55; }
.art-body th { padding: 0 1.4em 12px 0; text-align: start; font-size: var(--fs-0); font-weight: 500; color: var(--soft); border-block-end: 1.5px solid var(--rule); }
[dir="rtl"] .art-body th, [dir="rtl"] .art-body td { padding-inline: 0 1.4em; }
.art-body td { padding: 16px 1.4em 16px 0; vertical-align: top; border-block-end: 1.5px solid var(--rule); }
.art-body td:first-child { font-family: var(--serif); font-size: var(--fs-2); line-height: 1.35; white-space: nowrap; }
.art-body :is(th, td):last-child { padding-inline-end: 0; }

@media (min-width: 1101px) {
  .art-body > blockquote { grid-column: 2; grid-row: span 3; align-self: start; max-width: 21rem; margin-block: 0.35em 0; }
}

.art { padding-block-end: clamp(56px, 7vw, 96px); }
.art .back { margin-block-start: clamp(56px, 7vw, 96px); }

/* ---------- more articles, at the foot of one ---------- */
.art-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px clamp(24px, 3vw, 48px); }
.art-next h3 { margin-block-start: 6px; font-size: var(--fs-3); line-height: 1.25; }
.art-next h3 a, .post-list h2 a, .post-lead h2 a { text-decoration: none; }
.art-next h3 a:hover, .post-list h2 a:hover, .post-lead h2 a:hover { text-decoration: underline; }

/* ---------- the list of articles ---------- */
.post-pic { display: block; }
.post-pic img { aspect-ratio: 3 / 2; transition: opacity 0.3s ease; }
.post-pic:hover img { opacity: 0.9; }
.post-meta { font-size: var(--fs-0); color: var(--soft); }

/* the latest across the column, its words on the golden division below */
.post-lead { margin-block-end: clamp(56px, 7vw, 104px); }
.post-lead .post-pic img { aspect-ratio: 21 / 9; }
.post-lead .gr { margin-block-start: clamp(24px, 3vw, 40px); }
.post-lead h2 { font-size: var(--fs-4); max-width: 22ch; }
.post-lead h2 + p { margin-block-start: 16px; max-width: 52ch; color: var(--soft); font-size: var(--fs-2); line-height: 1.55; }
.post-lead .post-meta { padding-block-start: 0.6em; }

/* the rest in lines, each with its photograph on the narrow side */
.post-list > li { display: grid; grid-template-columns: 38.2fr 61.8fr; column-gap: clamp(24px, 4vw, 72px); row-gap: 18px; align-items: start; }
.post-list h2 { margin-block-start: 8px; font-size: var(--fs-3); max-width: 26ch; }
.post-list h2 + p { margin-block-start: 10px; max-width: 52ch; color: var(--soft); }
.art-sample:not(:first-child) { margin-block-start: 12px; }

/* ---------- smaller screens ---------- */
@media (max-width: 760px) {
  .art-body { display: block; }
  .art-lead .wrap { padding-inline: 0; }
  .post-lead .post-pic, .art-body > .fig { margin-inline: calc(var(--g) * -1); }
  .art-lead img, .post-lead .post-pic img { aspect-ratio: 4 / 3; }
  .art-lead figcaption, .art-body > .fig figcaption { padding-inline: var(--g); }
  .art-body > .fig img { aspect-ratio: 3 / 2; }
  .figs { grid-template-columns: 1fr; }
  /* a table becomes a list of its rows, each cell under its column's name */
  .art-body > table, .art-body tbody, .art-body tr, .art-body td { display: block; }
  .art-body thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .art-body tr { padding-block: 18px; border-block-end: 1.5px solid var(--rule); }
  .art-body tr:first-child { border-block-start: 1.5px solid var(--rule); }
  .art-body td, [dir="rtl"] .art-body td { padding: 0; border: 0; }
  .art-body td + td { margin-block-start: 10px; }
  .art-body td:not(:first-child)::before { content: attr(data-label); display: block; font-size: var(--fs-0); color: var(--soft); }
  .art-body td:first-child { white-space: normal; }
  .post-list > li { grid-template-columns: 1fr; }
  .post-lead .gr { row-gap: 10px; }
}
