/* The pages under /compare/, /guides/, and /connect/. This file adds to site.css, which has the tones, the header, and the footer.
   A page is an article: a head with one blot of paint, then a table or a text column, then the sources. */

.art { padding: clamp(26px, 3.6vw, 52px) var(--pad) 0; }

/* The head. The blot leads the title, as it leads each row of Why Sunday. */
.art-head { max-width: 1040px; }
.crumb { display: inline-block; font-size: 15px; font-weight: 600; color: var(--mut); margin-bottom: 18px; transition: color .15s; }
.crumb:hover { color: var(--fg); }
.art-blot { width: clamp(56px, 6vw, 84px); height: auto; margin: 0 0 clamp(10px, 1.4vw, 18px) -8px; mix-blend-mode: multiply; }
.art h1 { grid-column: auto; white-space: normal; font-size: clamp(40px, 6.4vw, 88px); line-height: 1; letter-spacing: -.048em; max-width: 13em; text-wrap: balance; }
.art-lead { margin-top: clamp(18px, 2.4vw, 30px); max-width: 37em; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.42; letter-spacing: -.012em; }
.art-lead p + p { margin-top: .7em; }
.art-date { margin-top: 18px; font-size: 14.5px; color: var(--mut); }
.art-date a, .srcs a, .prose a:not(.btn), .fine a { text-decoration: underline; text-decoration-color: #0000004d; text-underline-offset: 3px; }
.art-date a:hover, .srcs a:hover, .prose a:not(.btn):hover { text-decoration-color: currentColor; }

.art h2 { font-size: clamp(25px, 2.6vw, 36px); line-height: 1.08; letter-spacing: -.035em; max-width: 18em; }

/* A number that points to a source. */
.ref { font-size: .68em; font-weight: 600; line-height: 0; margin-left: .25em; color: var(--mut); }
.ref a { padding: 0 .12em; }
.ref a:hover { color: var(--fg); text-decoration: underline; }

/* The comparison: one row for each point, the other product, and then Sunday. */
.cmp-wrap { margin-top: clamp(34px, 4.6vw, 64px); }
.cmp { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: clamp(14px, 1.5vw, 20px) clamp(18px, 3vw, 44px) clamp(14px, 1.5vw, 20px) 0; }
.cmp thead td { width: 24%; }
.cmp thead th { padding-top: 0; padding-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--mut); }
.cmp thead th:last-child { color: var(--fg); }
.cmp tbody tr { border-top: 1px solid var(--line); }
.cmp tbody tr:first-child { border-top: 2px solid var(--fg); }
.cmp tbody tr:last-child { border-bottom: 1px solid var(--line); }
.cmp tbody th { font-weight: 500; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.cmp tbody td { font-size: clamp(15.5px, 1.2vw, 17px); line-height: 1.45; color: var(--sub); }
.cmp tbody td:last-child { color: var(--fg); font-weight: 500; letter-spacing: -.01em; padding-right: 0; }

/* When to choose each product. The two lists have the same weight. */
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); margin-top: var(--gap); }
.pick ul { margin-top: clamp(14px, 1.6vw, 22px); border-bottom: 1px solid var(--line); }
.pick li { padding: 13px 0; border-top: 1px solid var(--line); font-size: clamp(16.5px, 1.35vw, 19px); line-height: 1.38; letter-spacing: -.012em; }
.pick div:first-child li { color: var(--sub); }

.both { margin-top: var(--gap); max-width: 44em; }
.both p { margin-top: 14px; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.45; }
.both p:last-child { margin-top: 26px; }

.srcs { margin-top: var(--gap); max-width: 52em; font-size: 15px; line-height: 1.5; color: var(--sub); }
.srcs h2 { font-size: 20px; letter-spacing: -.02em; color: var(--fg); }
.srcs ol { margin: 14px 0 0; padding-left: 1.6em; }
.srcs li { padding: 2px 0 2px 4px; scroll-margin-top: 96px; }
.srcs li:target { color: var(--fg); font-weight: 500; }
.srcs p { margin-top: 16px; color: var(--mut); }

/* Links to the next pages. */
.more { margin-top: var(--gap); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; font-size: 16px; font-weight: 500; }
.more b { font-weight: 600; color: var(--mut); }
.more a { text-decoration: underline; text-decoration-color: #0000004d; text-underline-offset: 3px; }
.more a:hover { text-decoration-color: currentColor; }

/* A list of pages: the name, and one line on what the page says. */
.idx { margin-top: clamp(30px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.idx li { border-top: 1px solid var(--line); }
.idx li:first-child { border-top: 2px solid var(--fg); }
.idx a { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(18px, 3vw, 44px); align-items: baseline; padding: clamp(16px, 1.8vw, 24px) 0; transition: background-color .15s; }
.idx b { font-weight: 500; font-size: clamp(21px, 2.1vw, 30px); line-height: 1.1; letter-spacing: -.035em; }
.idx span { font-size: clamp(15.5px, 1.2vw, 17px); line-height: 1.45; color: var(--sub); }
.idx a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.prose h2 a { text-decoration: underline; text-decoration-color: #00000038; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.prose h2 a:hover { text-decoration-color: currentColor; }

/* A guide: the list of its parts stays in view next to the text. */
.read { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(34px, 4.6vw, 64px); padding-top: clamp(20px, 2.4vw, 32px); border-top: 2px solid var(--fg); }
.toc { position: sticky; top: 100px; align-self: start; font-size: 15px; line-height: 1.3; }
.toc b { display: block; font-weight: 600; margin-bottom: 12px; }
.toc a { display: block; padding: 5px 0; color: var(--mut); transition: color .15s; }
.toc a:hover { color: var(--fg); }

.prose { max-width: 40em; font-size: clamp(17px, 1.35vw, 18.5px); line-height: 1.56; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.9em; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h2 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose li { padding-left: .2em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--mut); }
.prose pre { padding: 15px 18px; border-radius: 12px; background: #efefec; overflow-x: auto; font: 14.5px/1.5 var(--mono); }
/* Words that a person gives to an agent. The lines wrap, as a message does. */
.prose pre.say { white-space: pre-wrap; }
.prose code { font: .88em var(--mono); background: #efefec; padding: .12em .35em; border-radius: 5px; }
.prose .fine { font-size: 15px; line-height: 1.5; color: var(--mut); }
.prose p:last-child { margin-top: 2em; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .pick { grid-template-columns: 1fr; }
  .read { grid-template-columns: 1fr; }
  .toc { display: none; }
  .idx a { grid-template-columns: 1fr; gap: 6px; }

  /* The table becomes a list. Each point shows the two products, one under the other, each with its name. */
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; }
  .cmp thead { display: none; }
  .cmp tbody tr { padding: 16px 0 18px; }
  .cmp tbody th, .cmp tbody td { padding: 0; }
  .cmp tbody td { margin-top: 12px; }
  .cmp tbody td::before { content: attr(data-who); display: block; font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--mut); margin-bottom: 2px; }
}
