/* Long-text pages: the blog, its articles and the terms. Layered on styles.css (tokens, bar, footer, store buttons).
   One reading column, set a little larger than the landings, with the bar and footer of the landings around it. */

::selection { background: var(--honey); color: var(--ink); }

.read { padding: clamp(120px, 15vw, 168px) 0 clamp(72px, 10vw, 120px); }
.read__wrap { width: min(1080px, 100% - clamp(32px, 7vw, 80px)); margin-inline: auto; }

.crumb { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: -4px; padding-right: 8px; font-weight: 600; font-size: .95rem; color: var(--muted); transition: color .2s; }
.crumb .i { transition: transform .25s var(--ease); }
.crumb:hover { color: var(--ink); }
.crumb:hover .i { transform: translateX(-3px); }

.read h1 { max-width: 22ch; margin-top: 14px; font-size: clamp(1.9rem, 4vw, 3.2rem); }
.read__intro { max-width: 58ch; margin-top: 22px; font-size: clamp(1.06rem, 1.4vw, 1.2rem); color: var(--ink-2); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 22px; font-size: .95rem; color: var(--muted); }
.meta a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--honey-deep); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.meta a:hover { text-decoration-color: var(--ink); }

/* ---------- article text ---------- */
.prose { max-width: 68ch; margin-top: clamp(36px, 5vw, 56px); font-size: 1.12rem; line-height: 1.72; color: var(--ink-2); }
.prose > * + * { margin-top: 1.05em; }
.prose .lead { max-width: none; margin-top: 0; padding-bottom: 1.4em; border-bottom: 1px solid var(--line); font-size: clamp(1.18rem, 1.7vw, 1.34rem); line-height: 1.6; color: var(--ink); }
.prose h2 { margin-top: 2.3em; font-size: clamp(1.28rem, 2vw, 1.6rem); line-height: 1.22; letter-spacing: -.025em; color: var(--ink); }
.prose h3 { margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .75em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--honey-deep); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.prose li { position: relative; padding-left: 1.75em; }
.prose li + li { margin-top: .5em; }
.prose ul > li::before { content: ""; position: absolute; left: .3em; top: .66em; width: 10px; height: 11.5px; background: var(--honey-deep); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.prose ol { counter-reset: n; }
.prose ol > li { counter-increment: n; }
.prose ol > li::before { content: counter(n) "."; position: absolute; left: 0; min-width: 1.4em; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- the app, at the end of an article ---------- */
.get { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 28px); max-width: 68ch; margin-top: clamp(48px, 7vw, 80px); padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: var(--honey); color: var(--ink); }
.get img { border-radius: 16px; box-shadow: 0 8px 20px -10px rgba(20, 20, 18, .45); }
.get h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.2; letter-spacing: -.025em; }
.get p { margin-top: 10px; max-width: 48ch; color: var(--ink-2); }
.get__stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- the list of articles ---------- */
.posts { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 9.5rem 1fr auto; column-gap: clamp(16px, 3vw, 40px); align-items: start; padding: clamp(22px, 3vw, 32px) 4px; border-bottom: 1px solid var(--line); }
.post time { grid-row: span 2; padding-top: .3em; font-size: .9rem; color: var(--muted); }
.post__t { font-family: var(--display); font-weight: 700; font-size: clamp(1.12rem, 1.8vw, 1.4rem); line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: .2em; transition: text-decoration-color .25s; }
.post__d { grid-column: 2; margin-top: 10px; max-width: 64ch; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post .i { grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: #fff; border: 1px solid var(--line); transition: transform .3s var(--ease), background .3s, border-color .3s; }
.post:hover .post__t { text-decoration-color: var(--honey-deep); }
.post:hover .i { transform: translateX(4px); background: var(--honey); border-color: var(--honey); }

/* ---------- the terms: contents on the side, the document in one column ---------- */
.doc { display: grid; grid-template-columns: 260px minmax(0, 68ch); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(36px, 5vw, 56px); }
.toc { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; overscroll-behavior: contain; padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.toc summary { min-height: 32px; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -2px; transition: rotate .25s var(--ease); }
.toc[open] summary::after { rotate: 225deg; translate: 0 2px; }
.toc ol { margin-top: 8px; }
.toc a { display: block; padding: 7px 10px; margin-inline: -10px; border-radius: 10px; font-size: .9rem; line-height: 1.35; color: var(--ink-2); transition: background .2s; }
.toc a:hover { background: var(--paper); }
.prose--doc { margin-top: 0; font-size: 1.04rem; line-height: 1.68; }
.prose--doc h2 { scroll-margin-top: 104px; }
.prose--doc > h2:first-child { margin-top: 0; }

@media (max-width: 1023px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
}

@media (max-width: 640px) {
  .read { padding-top: 132px; }
  .prose { font-size: 1.06rem; line-height: 1.68; }
  .get { grid-template-columns: 1fr; }
  .get img { width: 52px; height: 52px; }
  .post { grid-template-columns: 1fr; padding-inline: 0; }
  .post time { grid-row: auto; padding-top: 0; margin-bottom: 6px; }
  .post__d { grid-column: 1; }
  .post .i { display: none; }
}

/* big screens: the same page, with more air between its parts */
@media (min-width: 1200px) {
  .read { padding-top: 184px; padding-bottom: 136px; }
  .read h1 { margin-top: 20px; }
  .read__intro, .meta { margin-top: 28px; }
  .posts { margin-top: 88px; }
  .post { padding-block: 40px; column-gap: 48px; }
  .post__d { margin-top: 14px; }
  .prose { margin-top: 72px; }
  .prose > * + * { margin-top: 1.2em; }
  .prose .lead { padding-bottom: 1.7em; }
  .prose h2 { margin-top: 2.6em; }
  .prose h2 + *, .prose h3 + * { margin-top: .9em; }
  .prose li + li { margin-top: .65em; }
  .get { margin-top: 104px; padding: 48px; }
  .doc { margin-top: 72px; gap: 88px; }
}

/* the master side keeps its own mark in the bar */
.nav .brand b, .foot .brand b { margin-left: 2px; padding: 3px 8px 4px; border-radius: 8px; background: var(--honey); color: var(--ink); font-size: .78em; letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
  .crumb .i, .post .i, .post__t, .toc summary::after { transition: none; }
}
