/* Long-form article pages. Builds on style.css; nothing here changes the other pages. */
.article {
  max-width: 1030px;
}
.article h1 {
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 0.96;
  margin: 22px 0 22px;
  max-width: 17ch;
  text-wrap: balance;
}
.article .deck {
  max-width: 50ch;
  margin-bottom: 22px;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  margin: 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.byline strong {
  color: var(--ink);
  font-weight: 650;
}
.byline a {
  text-decoration: underline;
  text-decoration-color: #8e9689;
  text-underline-offset: 4px;
}
.byline span + span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 18px;
  background: var(--orange);
  transform: rotate(45deg) translateY(-2px);
}

/* Key takeaways and contents sit side by side on wide screens. */
.article-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
  margin-top: 34px;
}
.takeaways {
  background: #e7ebdf;
  border-left: 3px solid #617551;
  padding: 22px 24px 20px;
}
.takeaways h2,
.toc h2,
.tryit-label {
  margin: 0 0 12px;
  text-transform: uppercase;
  font: 600 10px/1.45 var(--mono);
  letter-spacing: 0.13em;
}
.takeaways ul {
  margin: 0;
  padding-left: 19px;
}
.takeaways li {
  margin: 0 0 9px;
  line-height: 1.5;
}
.takeaways li:last-child {
  margin-bottom: 0;
}
.toc {
  border-top: 1px solid var(--ink);
  padding-top: 14px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.toc li {
  border-bottom: 1px solid var(--line);
}
.toc a {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  line-height: 1.35;
}
.toc a:hover {
  color: #aa3a22;
}
.toc .n {
  flex: none;
  width: 1.6em;
  font: 600 11px/1.75 var(--mono);
  color: var(--muted);
}

/* Body copy */
.article .detail-section {
  scroll-margin-top: 92px;
}
.article .detail-section h2 {
  font-size: clamp(31px, 3.3vw, 45px);
  line-height: 1.04;
  max-width: 28ch;
  margin: 0 0 18px;
  text-wrap: balance;
}
.sec-no {
  display: block;
  margin-bottom: 12px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.13em;
  color: #6b4937;
}
.prose p,
.prose li {
  font-size: 17px;
  line-height: 1.68;
}
.prose p,
.prose ul,
.prose ol {
  max-width: 68ch;
}
.prose p {
  margin: 0 0 17px;
}
.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.prose li {
  margin: 0 0 8px;
}
.prose h3 {
  font: 400 clamp(23px, 2.3vw, 29px) / 1.16 var(--serif);
  letter-spacing: -0.02em;
  margin: 30px 0 10px;
  max-width: 32ch;
}
.prose a,
.takeaways a,
.sources a,
.source-log a {
  text-decoration: underline;
  text-decoration-color: #c9715a;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover,
.takeaways a:hover,
.sources a:hover,
.source-log a:hover {
  color: #aa3a22;
  text-decoration-color: currentColor;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: #e9e8dc;
  padding: 1px 5px;
  white-space: pre-wrap;
}
.prose .table-wrap {
  margin: 22px 0 26px;
}
.prose td,
.prose th {
  vertical-align: top;
  line-height: 1.45;
}
.prose td {
  font-size: 14.5px;
}
.table-wrap:focus-visible {
  outline: 3px solid #bd3e22;
  outline-offset: 3px;
}

/* The interactive version of the worked example */
.tryit {
  margin-top: 46px;
  padding: clamp(22px, 3.2vw, 38px);
  background: #e8e8db;
  border: 1px solid #cccfbe;
}
.tryit h2 {
  font-size: clamp(29px, 3vw, 41px);
  line-height: 1.04;
  margin: 0 0 12px;
}
.tryit h3 {
  font: 600 15px var(--sans);
  letter-spacing: 0;
  margin: 26px 0 8px;
}
.tryit p {
  max-width: 68ch;
}
.tryit .note {
  background: var(--light);
}
.tryit .quote {
  font-size: clamp(20px, 2.1vw, 26px);
}
.tryit .claim summary {
  font-size: 15px;
}

/* Questions, sources and the source log */
.faq h3 {
  font: 400 clamp(23px, 2.3vw, 29px) / 1.16 var(--serif);
  letter-spacing: -0.02em;
  margin: 28px 0 9px;
  max-width: 34ch;
}
.faq h3:first-of-type {
  margin-top: 6px;
}
.sources {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  max-width: 78ch;
}
.sources li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.source-log {
  margin-top: 26px;
  border: 1px solid var(--line);
  background: var(--light);
}
.source-log summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
}
.source-log p {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 80ch;
}
.source-log .table-wrap {
  margin: 0;
  border-width: 1px 0 0;
}
.source-log td {
  font-size: 13px;
  vertical-align: top;
  line-height: 1.45;
}
.source-log td:first-child {
  font-family: var(--mono);
  color: var(--muted);
  width: 3em;
}
.source-log td:last-child {
  white-space: nowrap;
}
.article-end {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  max-width: 78ch;
}
.article-end p {
  margin: 0 0 8px;
}
.more-work {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 16px;
}

@media (max-width: 820px) {
  .article-top {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .article h1 {
    font-size: clamp(38px, 10.6vw, 54px);
    line-height: 0.98;
  }
  .byline {
    font-size: 12px;
    gap: 5px 14px;
  }
  .byline {
    display: grid;
    gap: 3px;
  }
  .byline span + span::before {
    display: none;
  }
  .prose p,
  .prose li {
    font-size: 16px;
    line-height: 1.62;
  }
  .article .detail-section h2 {
    font-size: clamp(28px, 7.6vw, 36px);
  }
  .tryit {
    margin-inline: -8px;
    padding: 20px 16px;
  }
  .source-log td:last-child {
    white-space: normal;
  }
}
@media print {
  .mast,
  .back,
  .toc,
  .tryit,
  .foot,
  .skip {
    display: none !important;
  }
  .article {
    padding: 0;
  }
  .prose a::after {
    content: " (" attr(href) ")";
    font-size: 11px;
    color: #555;
    word-break: break-all;
  }
  .source-log[open] summary {
    display: none;
  }
}

/* The list of articles on /writing */
.writing-list .work-row {
  grid-template-columns: minmax(90px, 0.16fr) 1fr 48px;
  align-items: start;
}
.writing-list .work-row h3 {
  font-size: clamp(26px, 2.9vw, 40px);
  line-height: 1.04;
  text-wrap: balance;
}
.writing-list .work-row p {
  max-width: 62ch;
}
.writing-list .row-meta {
  margin-top: 10px;
  font: 12px var(--mono);
  color: var(--muted);
}
.writing-list .row-arrow {
  margin-top: 6px;
}
@media (max-width: 700px) {
  .writing-list .work-row {
    grid-template-columns: 1fr 32px;
  }
}
