/* Articles: single.php, home.php, archive.php. From the Phase 2 prototype (article.html). */

/* Header */
.art-hd { padding-bottom: 24px; }
.art-hd__in { display: grid; gap: 14px; max-width: 860px; padding-block: 8px 24px; }
.art-eyebrow { font-size: var(--t-s); font-weight: var(--fw-m); color: var(--muted); }
.art-hd h1 { font-size: clamp(2rem, 4vw, var(--t-3xl)); font-weight: var(--fw-h); letter-spacing: -.02em; line-height: 1.1; }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: var(--t-s); color: var(--muted); }
.art-meta span + span::before { content: "·"; margin-right: 18px; }
.art-meta__av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.art-hd__img { margin: 0; }
.art-hd__img img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: var(--radius-lg); }

/* Body with the contents list beside it */
.art-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 24px 56px; }
.art-grid--solo { grid-template-columns: minmax(0, 860px); justify-content: center; }
.art-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; max-width: 860px; }
.art-body .prose { max-width: 72ch; font-size: var(--t-b); line-height: 1.7; }
.art-body .prose h2 { font-size: var(--t-2xl); margin-top: 16px; }
.art-body .prose h3 { font-size: var(--t-xl); }
.art-body .flex-cols { gap: 24px 40px; }

.toc h2 { font-size: var(--t-s); color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; display: grid; }
.toc a { display: flex; align-items: center; min-height: 48px; padding: 6px 12px; border-left: 3px solid var(--line); font-size: var(--t-s); line-height: 1.3; text-decoration: none; }
.toc a:hover { border-left-color: var(--navy); background: var(--mist); text-decoration: underline; }
.toc a[aria-current="true"] { border-left-color: var(--green); background: var(--mint); font-weight: var(--fw-m); }
.toc--side { position: sticky; top: calc(var(--hd-h, 120px) + 16px); max-height: calc(100vh - var(--hd-h, 120px) - 32px); overflow-y: auto; }
.toc--mob { display: none; border: 2px solid var(--line); border-radius: var(--radius); }
.toc--mob summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 16px; font-weight: var(--fw-m); cursor: pointer; }
.toc--mob summary::-webkit-details-marker { display: none; }
.toc--mob[open] summary .ic { transform: rotate(180deg); }
.toc--mob ol { padding: 0 8px 8px; }

/* Author, contact cards, about box */
.author { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border-radius: var(--radius-lg); background: var(--mist); }
.author__av { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: none; }
.author__name { font-size: var(--t-l); font-weight: var(--fw-m); }
.author__bio { color: var(--muted); }
.author > div { min-width: 0; overflow-wrap: break-word; } /* a long word or link in the bio wraps instead of widening the page */
.art-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; padding-bottom: 40px; }
.art-card { display: grid; gap: 12px; align-content: start; padding: 24px; border: 2px solid var(--line); border-radius: var(--radius-lg); }
.art-card__icon { width: 56px; height: 56px; object-fit: contain; }
.art-card h2 { font-size: var(--t-xl); }
.art-card input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .art-card textarea { width: 100%; min-height: 52px; padding: 0 14px; border: 2px solid var(--line-strong); border-radius: var(--btn-radius); font: var(--t-b) var(--font); color: var(--navy); }
.art-card textarea { padding-block: 12px; }
.art-card input[type="submit"], .art-card button[type="submit"] { min-height: 52px; padding: 0 24px; border: 2px solid var(--navy); border-radius: var(--btn-radius); background: var(--navy); color: #fff; font: var(--fw-m) var(--t-b) var(--font); cursor: pointer; }
.about-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; margin-bottom: 56px; padding: clamp(20px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--mint); }
.about-box__img img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.about-box__txt { display: grid; gap: 14px; justify-items: start; }
.about-box h2 { font-size: var(--t-2xl); }

/* Keep reading */
.art-rel { border-bottom: 0; }
.art-rel__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.art-rel__head .art-eyebrow { flex-basis: 100%; }
.art-rel__head h2 { min-width: 0; font-size: var(--t-2xl); overflow-wrap: break-word; }
.art-rel__head a { display: inline-flex; align-items: center; min-height: 48px; font-weight: var(--fw-m); }
.art-rel__intro { flex-basis: 100%; max-width: 72ch; overflow-wrap: break-word; }

/* The articles page and post archives */
.arts-hd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; align-items: center; padding-block: 32px; }
.arts-hd--plain { grid-template-columns: 1fr; }
.arts-hd h1 { font-size: var(--t-3xl); font-weight: var(--fw-h); letter-spacing: -.02em; line-height: 1.1; }
.arts-hd__intro { margin-top: 12px; color: var(--muted); }
.arts-hd__img { margin: 0; }
.arts-hd__img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-lg); }
.arts-list { padding-bottom: 56px; }
.arts-list .art__t { font-size: var(--t-l); }
.arts-pages { margin-top: 32px; }
.arts-pages .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.arts-pages .page-numbers { display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 0 12px; border: 2px solid var(--line-strong); border-radius: var(--btn-radius); text-decoration: none; font-weight: var(--fw-m); }
.arts-pages a.page-numbers:hover { border-color: var(--navy); background: var(--mist); }
.arts-pages .current { border-color: var(--navy); background: var(--navy); color: #fff; }
.arts-pages .dots { border-color: transparent; }

@media (max-width: 1023px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); } /* minmax(0, …): a wide picture or list can't widen the page */
  .toc--side { display: none; }
  .toc--mob { display: block; }
}
@media (max-width: 759px) {
  .art-meta span + span::before { content: none; }
  .art-meta { gap: 4px 14px; }
  .about-box, .arts-hd { grid-template-columns: 1fr; }
  .arts-hd h1 { font-size: var(--t-2xl); }
  .arts-hd__img { order: -1; }
}
