/* Blog article (read from the CMS): a dark head with the title and the picture, then the text on the light page in a
   reading column with a sticky table of contents, tables that scroll on a phone and the dark "talk to us" cards. */
.art-hero { padding: 58px 0 clamp(48px, 6vw, 88px); }
.art-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 72px); align-items: end; margin-top: clamp(40px, 6vw, 88px); }
.art-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 22px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.art-meta a { color: var(--lime); text-decoration: none; }
.art-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.art-h1 { max-width: 20ch; font-size: clamp(36px, 4.4vw, 72px); font-weight: 300; line-height: 1.02; letter-spacing: -0.05em; }
.art-lead { max-width: 56ch; margin-top: 26px; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; color: var(--muted); }
.art-by { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: 0.02em; color: var(--cream); }
.art-by a { color: inherit; text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 4px; }
.art-by span { color: var(--muted); }
.art-by { align-items: center; }
.art-by__photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.art-hero__img { overflow: hidden; border-radius: 8px; background: var(--deep); }
.art-hero__img img { display: block; width: 100%; height: auto; }

/* body: table of contents | text */
.art-body { padding-top: clamp(48px, 6vw, 96px); }
.art-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.art-toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 8px; }
.art-toc summary { margin-bottom: 14px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; }
.art-toc summary::-webkit-details-marker { display: none; }
.art-toc summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.art-toc ol { display: grid; gap: 2px; counter-reset: toc; }
.art-toc li { counter-increment: toc; }
.art-toc a { display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color 0.25s; }
.art-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; padding-top: 2px; color: #6f7a0e; }
.art-toc a:hover, .art-toc a[aria-current="true"] { color: var(--green); }
.art-toc a[aria-current="true"]::before { color: var(--green); }
.art-grid > .art-prose:only-child { grid-column: 1 / -1; max-width: 72ch; margin-inline: auto; }

/* the text */
.art-prose { min-width: 0; width: 100%; max-width: 72ch; overflow-wrap: anywhere; font-size: 18px; line-height: 1.65; color: rgba(2, 39, 31, 0.86); }
.art-prose > * + * { margin-top: 1.1em; }
.art-prose :is(h2, h3, h4) { color: var(--green); scroll-margin-top: 90px; }
.art-prose h2 { margin-top: 2.2em; font-size: clamp(26px, 2.4vw, 36px); font-weight: 400; line-height: 1.12; letter-spacing: -0.035em; }
.art-prose h3 { margin-top: 1.8em; font-size: clamp(20px, 1.6vw, 24px); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }
.art-prose h4 { margin-top: 1.6em; font-size: 18px; font-weight: 600; }
.art-prose :is(h2, h3, h4) + * { margin-top: 0.6em; }
.art-prose :is(h2, h3) strong { font-weight: inherit; }
.art-prose strong, .art-prose b { font-weight: 600; color: var(--green); }
.art-prose a { color: var(--green); text-decoration: underline; text-decoration-color: rgba(143, 156, 18, 0.7); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.art-prose a:hover { text-decoration-color: var(--green); }
.art-prose :is(ul, ol) { padding-left: 1.3em; }
.art-prose ul { list-style: disc; }
.art-prose ol { list-style: decimal; }
.art-prose li + li { margin-top: 0.45em; }
.art-prose li::marker { color: #8f9c12; }
.art-prose code { font-family: var(--mono); font-size: 0.82em; }
.art-prose blockquote { padding-left: 20px; border-left: 2px solid var(--lime); }

/* tables: full width of the column, scroll sideways on a phone */
.art-table { margin-block: 1.6em; overflow-x: auto; border-top: 1px solid var(--green); }
.art-table:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.art-table table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.art-table caption { caption-side: bottom; padding-top: 10px; text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: rgba(2, 39, 31, 0.6); }
.art-table :is(th, td) { padding: 12px 14px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(2, 39, 31, 0.14); }
.art-table thead th { padding-top: 14px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.art-table tbody th { font-weight: 600; color: var(--green); }

/* pictures */
.art-fig { margin-block: 1.8em; }
.art-fig img { width: 100%; height: auto; border-radius: 6px; background: #fff; }
.art-fig figcaption { margin-top: 10px; font-size: 11px; letter-spacing: 0.04em; color: rgba(2, 39, 31, 0.6); }

/* the "talk to us" card */
.art-cta { margin-block: 2.2em; padding: clamp(24px, 3vw, 40px); border-radius: 8px; background: var(--green); color: var(--cream); }
.art-prose .art-cta > * + * { margin-top: 14px; }
.art-prose .art-cta__h { margin-top: 0; font-size: clamp(24px, 2.2vw, 32px); font-weight: 300; line-height: 1.1; letter-spacing: -0.035em; color: var(--cream); }
.art-cta p { font-size: 16px; color: rgba(244, 247, 213, 0.75); }
.art-prose .art-cta__list { display: grid; gap: 8px; padding: 18px 0 4px; border-top: 1px solid rgba(244, 247, 213, 0.14); list-style: none; }
.art-cta__list li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.45; color: var(--cream); }
.art-prose .art-cta__list li + li { margin-top: 0; }
.art-cta__list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: var(--lime); }
.art-prose .art-cta .btn { margin-top: 22px; color: var(--green); text-decoration: none; }

/* keep reading */
.art-more { padding-top: 0; }
.art-more__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: clamp(48px, 6vw, 96px); border-top: 1px solid rgba(2, 39, 31, 0.14); }
.art-more__head .link { font-size: 15px; white-space: nowrap; }

@media (max-width: 1000px) {
  .art-hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .art-grid { grid-template-columns: minmax(0, 1fr); }   /* 1fr let a 540px table widen the page on phones */
  .art-toc { position: static; max-height: none; padding: 0 0 8px; }
  .art-toc summary { display: flex; justify-content: space-between; margin-bottom: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .art-toc summary::after { content: "+"; font-size: 14px; }
  .art-toc details[open] summary::after { content: "−"; }
  .art-prose { font-size: 17px; }
}
