/* Shared by the article-style pages (guides, comparisons, docs, legal, cost per successful task), loaded after /base.css. */
.article { padding: clamp(112px, 16svh, 160px) var(--gutter-r) clamp(56px, 9svh, 112px) var(--gutter-l); }
.article .inner { max-width: 760px; margin: 0 auto; }
.cta .inner { max-width: 760px; margin: 0 auto; }

/* Breadcrumb */
.crumbs { margin: 0 0 20px; font: 500 14px/1.5 var(--sans); color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs span[aria-hidden] { margin: 0 0.4em; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--ink); } }
@media (pointer: coarse) { .crumbs a { display: inline-block; padding: 8px 0; } }

/* Type: Funnel Display for h1, h2 and big numbers; Inter for everything else. */
.article h1 { margin: 0; font-size: clamp(2.2rem, 4.8vw, 3.6rem); line-height: 1.04; }
.article h2 { margin-top: 56px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); max-width: none; }
.article h2[id] { scroll-margin-top: calc(var(--bar-h) + 24px); }
.article h3 { margin: 28px 0 0; font-weight: 700; font-size: 1.15rem; }
.article p, .article li { max-width: 68ch; overflow-wrap: break-word; color: var(--ink-soft); font-size: 1.06rem; }
.article p { margin: 16px 0 0; }
.article ul, .article ol { margin: 16px 0 0; padding-left: 1.2em; }
.article li + li { margin-top: 8px; }
.article strong { color: var(--ink); }
.meta { margin: 14px 0 0 !important; font: 500 14px var(--sans); color: var(--muted); }

/* Inline code */
.article :not(pre) > code {
  font: 500 0.88em/1 var(--mono); padding: 0.15em 0.4em; border-radius: 4px;
  background: var(--wash); color: var(--ink);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.article p code, .article li code { overflow-wrap: anywhere; }

/* The short answer at the top of a page */
.article .answer { max-width: none; margin: 28px 0 0; padding: 20px 24px; background: var(--wash); border: 0; border-left: 3px solid var(--ink); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); font-size: 1.15rem; }

/* Stat row */
.big { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; margin: 28px 0 0; }
.big div { padding: 18px 22px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.big b { display: block; font: 500 2.4rem/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big .win b { color: var(--accent); }
.big span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 15px; }

/* Tables: always inside .table-wrap so wide ones scroll on their own instead of the page. */
.table-wrap { margin: 20px 0 0; overflow-x: auto; overscroll-behavior-x: contain; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 600; color: var(--ink-soft); padding: 10px 12px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--rule); color: var(--ink); vertical-align: top; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th + th, .table td + td { text-align: right; }
.table.text th + th, .table.text td + td { text-align: left; }
.table th.num, .table td.num { text-align: right; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.table code { white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .table tbody tr:hover td { background: rgba(18, 18, 18, 0.03); }
}

/* Code blocks. /book.js puts a .copy button first inside each one. */
pre.code {
  position: relative; margin: 20px 0 0; padding: 18px 92px 18px 22px; border-radius: 8px;
  background: var(--ink); color: #E8E7E3; font: 400 13px/1.7 var(--mono);
  white-space: pre; tab-size: 2; overflow-x: auto; overscroll-behavior-x: contain;
}
.code .c { color: var(--on-ink-soft); }
.copy {
  position: absolute; top: 10px; right: 10px;
  padding: 6px 10px; border: 0; border-radius: 6px;
  background: rgba(255, 255, 255, 0.08); color: var(--on-ink); font: 500 12px/1 var(--sans);
  cursor: pointer; -webkit-user-select: none; user-select: none;
  transition: background-color 150ms ease, transform 150ms var(--ease-out);
}
.copy:active { transform: scale(0.97); }
.copy:focus-visible { outline-color: var(--accent-glow); }
@media (hover: hover) and (pointer: fine) { .copy:hover { background: rgba(255, 255, 255, 0.14); } }
/* On phones the code starts below the button, and the right edge fades to show the block scrolls. The top band
   holding the button is left unfaded. */
@media (max-width: 760px) {
  pre.code {
    padding: 48px 22px 18px;
    -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(to right, #000 calc(100% - 20px), transparent);
    -webkit-mask-size: 100% 44px, 100% 100%; -webkit-mask-repeat: no-repeat;
    mask-image: linear-gradient(#000 0 0), linear-gradient(to right, #000 calc(100% - 20px), transparent);
    mask-size: 100% 44px, 100% 100%; mask-repeat: no-repeat;
  }
}

/* Questions and answers */
.qa { margin-top: 24px; }
.qa h3 { margin-top: 0; }
.qa + .qa { padding-top: 24px; border-top: 1px solid var(--rule); }

/* Table of contents */
.toc { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.toc li { margin: 0 !important; }
.toc a {
  display: inline-block; padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 14px; text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, opacity 150ms ease;
}
.toc a:active { opacity: 0.7; }
@media (hover: hover) and (pointer: fine) { .toc a:hover { border-color: var(--ink); } }
@media (pointer: coarse) { .toc a { padding: 10px 14px; } }

/* Link cards: the whole card is the link. */
.cards { list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.article .cards li {
  position: relative; max-width: none; margin: 0; padding: 18px 22px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); transition: border-color 150ms ease;
}
.cards a { font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.cards a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cards a:focus-visible { outline: none; }
.cards li:has(a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.cards span { display: block; margin-top: 6px; font-size: 0.98rem; }
@media (hover: hover) and (pointer: fine) { .cards li:hover { border-color: var(--ink); } }

/* Legal pages and callouts */
.legal h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 44px; }
.callout { margin: 20px 0 0; padding: 16px 20px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); }
.article .callout p { margin: 0; }

