/* ============================================================================
   article.css - reading surface for PinDrift guides
   ============================================================================
   Mode: Read. The visitor came with a question. Structure serves comprehension
   first, and then the page has to be worth staying inside.

   The shape is a wide canvas with a narrow text column, not a wide text column.
   Prose sits at ~68 characters because that is where reading speed peaks; the
   width goes to a left rail that tracks where you are, and to figures, tables
   and quotes that break out past the measure. A 100-character line is not a
   more generous page, it is a slower one.

   Self-contained. It does not import styles.css, so the marketing design system
   cannot break an article.
   ========================================================================= */

/* --------------------------------------------------------------- palette
   Ink on warm paper. The accent is not a hue: white on the dark ground, ink on
   the light one. A green accent made these read like a different product from
   the rest of the site, which is monochrome everywhere else
   and never has to shout; it marks links, the rule under a live section, and
   the reading progress. Nothing else is coloured. */
:root {
  color-scheme: light;
  --p-bg:       #FCFBF8;
  --p-raise:    #F4F1EA;
  --p-sink:     #ECE8DE;
  --p-ink:      #17181A;
  --p-body:     #34363A;
  --p-quiet:    #66686E;
  --p-faint:    #6E7077;
  --p-rule:     #E0DCD1;
  --p-rule-2:   #CFCABC;
  --p-accent:   #17181A;
  --p-accent-2: #000000;
  --p-wash:     #F1EEE6;
  --p-warn:     #A8452C;

  /* Newsreader was a literary serif and it made every page read like a
     broadsheet leader column: correct, formal, and not us. PinDrift's own
     surfaces are a tight grotesk, so the articles are one too. Headings get
     Inter Tight at real display weights with the tracking pulled in; the
     italic that carried the old standfirst is gone, because a slanted grotesk
     is not the same gesture and pretending otherwise looks like a mistake. */
  --p-display: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --p-sans:  Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --p-mono:  ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --p-measure: 42rem;   /* measured at 70 characters at this body size */
  --p-rail:    12rem;
  --p-gap:     3.5rem;
  --p-shadow:  0 1px 1px rgba(23,24,26,.04), 0 10px 28px -12px rgba(23,24,26,.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-pindrift-theme="light"]) {
    color-scheme: dark;
    --p-bg:       #101113;
    --p-raise:    #17181B;
    --p-sink:     #1D1F22;
    --p-ink:      #F2F0EB;
    --p-body:     #C7C6C2;
    --p-quiet:    #93938F;
    --p-faint:    #8A8A85;
    --p-rule:     #26282C;
    --p-rule-2:   #383A3F;
    --p-accent:   #FFFFFF;
    --p-accent-2: #FFFFFF;
    --p-wash:     #1B1D21;
    --p-warn:     #E08A72;
    --p-shadow:   0 1px 1px rgba(0,0,0,.5), 0 12px 32px -14px rgba(0,0,0,.7);
  }
}
[data-pindrift-theme="dark"] {
  color-scheme: dark;
  --p-bg:       #101113;
  --p-raise:    #17181B;
  --p-sink:     #1D1F22;
  --p-ink:      #F2F0EB;
  --p-body:     #C7C6C2;
  --p-quiet:    #93938F;
  --p-faint:    #8A8A85;
  --p-rule:     #26282C;
  --p-rule-2:   #383A3F;
  --p-accent:   #FFFFFF;
  --p-accent-2: #FFFFFF;
  --p-wash:     #1B1D21;
  --p-warn:     #E08A72;
  --p-shadow:   0 1px 1px rgba(0,0,0,.5), 0 12px 32px -14px rgba(0,0,0,.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-body);
  font-family: var(--p-sans);
  font-size: 1.125rem;
  line-height: 1.7;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------- the browser's own bits
   Selection, caret, scrollbar and focus ship with defaults that belong to no
   design. They are part of the surface and they get the palette too. */
::selection { background: var(--p-accent); color: var(--p-bg); }
:root { scrollbar-color: var(--p-rule-2) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--p-rule-2); border-radius: 99px;
  border: 3px solid var(--p-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--p-quiet); }
:focus-visible {
  outline: 2px solid var(--p-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
a { color: inherit; }

/* ------------------------------------------------------------------- chrome */
.a-progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 0; z-index: 60;
  background: var(--p-accent);
}

.a-bar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--p-bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--p-rule);
}
.a-bar-in {
  max-width: 76rem; margin: 0 auto; padding: 0.85rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.a-back {
  font-size: .875rem; font-weight: 500; color: var(--p-quiet);
  text-decoration: none; letter-spacing: .01em;
}
.a-back:hover { color: var(--p-ink); }
.a-bar-cta {
  font-size: 1rem; font-weight: 700; letter-spacing: -.015em;
  color: var(--p-ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: .55rem;
}
/* The masthead used to say "PinDrift" in words and nothing else, which on a
   page with no site header is the only place the brand appears. It is the
   actual mark now: the same rounded square and centred dot as the header on
   every other page, drawn in CSS so it inherits the article's own ink. */
.a-mark {
  width: 21px; height: 21px; border-radius: 4px;
  background: var(--p-ink);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.a-mark::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--p-bg);
}
.a-bar-cta { transition: opacity .15s ease; }
.a-bar-cta:hover { opacity: .62; }

/* -------------------------------------------------------------------- grid
   One named grid drives the whole article. The text lives in `text`; anything
   that should break the measure claims `wide` or `full` instead. */
.a-wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [wide-start] var(--p-rail)
    [text-start] minmax(0, var(--p-measure))
    [text-end] var(--p-gap)
    [wide-end] minmax(0, 1fr)
    [full-end];
  column-gap: 0;
}
.a-wrap > * { grid-column: text; min-width: 0; }

/* ----------------------------------------------------------------- masthead */
.a-head { grid-column: wide; padding: 5.5rem 0 0; }
.a-head-in { max-width: 48rem; }
.a-title {
  font-family: var(--p-display);
  font-optical-sizing: auto;
  font-size: clamp(2.375rem, 5.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.042em;
  font-weight: 800;
  color: var(--p-ink);
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.a-standfirst {
  font-family: var(--p-display);
  font-size: clamp(1.1875rem, 2vw, 1.4375rem);
  line-height: 1.4; font-weight: 500; letter-spacing: -.018em;
  color: var(--p-quiet);
  margin: 0 0 2.5rem; max-width: 40rem;
  text-wrap: pretty;
}

/* Byline: set, not badged. No avatar, no chip. */
.a-byline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem;
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--p-ink);
  border-bottom: 1px solid var(--p-rule);
  margin-bottom: 3.5rem;
  font-size: .8125rem;
  color: var(--p-faint);
  letter-spacing: .02em;
}
.a-byline-name {
  font-size: .8125rem; font-weight: 700; color: var(--p-ink);
  text-transform: uppercase; letter-spacing: .09em;
}
.a-byline-sep { color: var(--p-rule-2); }
.a-byline time { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- the left rail
   Shows which section you are in. It is the page's one piece of authored
   motion: the label crossfades when the section changes and the rule under it
   grows from the left. */
.a-rail {
  grid-column: wide-start / text-start;
  grid-row: span 999;
  position: sticky; top: 5.5rem; align-self: start;
  height: 0; overflow: visible;
  padding-right: 2rem;
  pointer-events: none;
}
.a-rail-inner { max-width: 10rem; }
.a-rail-label {
  display: block;
  font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--p-quiet);
  line-height: 1.35;
  opacity: 0; transform: translateY(.35rem);
  transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1);
}
.a-rail-label.is-on { opacity: 1; transform: none; }
.a-rail-rule {
  display: block; height: 1px; width: 2.25rem; margin-top: .7rem;
  background: var(--p-accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.a-rail-label.is-on + .a-rail-rule { transform: scaleX(1); }
@media (max-width: 1080px) { .a-rail { display: none; } }

/* ------------------------------------------------------------------ prose */
/* display:contents dissolves this wrapper so its children become grid items of
   .a-wrap directly. Without it .a-body is a single grid item in the `text`
   column, and a figure or a callout inside it can only ever be as wide as the
   prose, no matter what grid-column it asks for. */
.a-body { display: contents; }
.a-body > * { grid-column: text; }

.a-body p {
  margin: 0 0 1.45em;
  text-wrap: pretty;
  hanging-punctuation: first last;
}
.a-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--p-display);
  font-size: 3.4em;
  line-height: .78;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--p-ink);
  padding: .06em .09em 0 0;
}

.a-body h2 {
  font-family: var(--p-display);
  font-optical-sizing: auto;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  line-height: 1.14; letter-spacing: -0.032em; font-weight: 750;
  color: var(--p-ink);
  margin: 3.6rem 0 1.1rem;
  scroll-margin-top: 5rem;
  text-wrap: balance;
}
.a-body h3 {
  font-family: var(--p-sans);
  font-size: 1rem; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
  color: var(--p-ink);
  margin: 2.4rem 0 .7rem;
  scroll-margin-top: 5rem;
}
.a-body a:not(.a-cta-btn) {
  color: var(--p-accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  text-decoration-color: color-mix(in srgb, var(--p-accent) 55%, transparent);
  transition: text-decoration-color .15s ease, color .15s ease;
}
.a-body a:not(.a-cta-btn):hover {
  color: var(--p-accent-2);
  text-decoration-color: currentColor;
}
.a-body strong { color: var(--p-ink); font-weight: 600; }

.a-body ul, .a-body ol { margin: 0 0 1.45em; padding-left: 0; list-style: none; }
.a-body li { position: relative; padding-left: 1.5rem; margin: 0 0 .7em; }
.a-body ul > li::before {
  content: ""; position: absolute; left: .1rem; top: .72em;
  width: .3rem; height: 1px; background: var(--p-rule-2);
}
.a-body ol { counter-reset: n; }
.a-body ol > li { counter-increment: n; }
.a-body ol > li::before {
  content: counter(n);
  position: absolute; left: 0; top: .04em;
  font-size: .75rem; font-weight: 700; color: var(--p-faint);
  font-variant-numeric: tabular-nums;
}

.a-body code {
  font-family: var(--p-mono); font-size: .84em;
  background: var(--p-sink); color: var(--p-ink);
  padding: .12em .38em; border-radius: 3px;
}
.a-body hr {
  border: 0; height: 1px; background: var(--p-rule);
  margin: 3rem 0; grid-column: text;
}

/* ---------------------------------------------------------------- figures
   Figures claim the wide track. On a narrow viewport they fall back into the
   measure with the rest of the prose. */
.a-fig { grid-column: wide; margin: 3rem 0; }
.a-fig img, .a-fig video {
  display: block; width: 100%; height: auto;
  border-radius: 3px;
  background: var(--p-raise);
  box-shadow: var(--p-shadow);
}
.a-fig-phone { grid-column: text; max-width: 17rem; }
.a-fig-phone img, .a-fig-phone video { border-radius: 14px; }
.a-fig figcaption {
  font-size: .8125rem; line-height: 1.55; color: var(--p-faint);
  margin-top: .85rem; max-width: 30rem;
  padding-left: 1rem; border-left: 1px solid var(--p-rule-2);
}

/* callout: a note in the margin idiom, not a coloured card */
.a-note {
  grid-column: wide; margin: 2.6rem 0;
  padding: 1.4rem 0 1.4rem 1.6rem;
  border-left: 1px solid var(--p-accent);
  max-width: 44rem;
}
.a-note p { margin: 0; font-size: 1.0625rem; color: var(--p-quiet); }
.a-note p + p { margin-top: .8rem; }
.a-note strong { color: var(--p-ink); }

/* pull quote: sits in the wide track, serif, no quotation marks */
.a-pull {
  grid-column: wide; margin: 3.2rem 0;
  font-family: var(--p-display);
  font-size: clamp(1.4375rem, 2.8vw, 1.9375rem);
  line-height: 1.24; letter-spacing: -.032em; font-weight: 700;
  color: var(--p-ink); max-width: 42rem;
  border: 0; padding: 0;
}

/* tables */
.a-table-wrap, .docs-table {
  grid-column: wide; margin: 2.6rem 0; overflow-x: auto;
}
.a-table, table.docs-table {
  width: 100%; border-collapse: collapse;
  font-size: .9375rem; font-variant-numeric: tabular-nums;
}
.a-table th, .a-table td,
.docs-table th, .docs-table td {
  padding: .7rem 1.1rem .7rem 0; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--p-rule);
}
.a-table th, .docs-table th {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .11em;
  color: var(--p-faint); font-weight: 700;
  border-bottom-color: var(--p-ink);
}
.a-table tr:last-child td, .docs-table tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------------- FAQ */
.a-faq-h {
  font-family: var(--p-display); font-weight: 750;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  letter-spacing: -.032em; color: var(--p-ink);
  margin: 4.5rem 0 .4rem; scroll-margin-top: 5rem;
}
.a-faq { border-top: 1px solid var(--p-ink); margin-top: 1.4rem; }
.a-faq details { border-bottom: 1px solid var(--p-rule); }
.a-faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-size: 1.0625rem; font-weight: 600; color: var(--p-ink);
}
.a-faq summary::-webkit-details-marker { display: none; }
.a-faq summary::after {
  content: ""; position: absolute; right: .5rem; top: 1.6rem;
  width: .6rem; height: .6rem;
  border-right: 1.5px solid var(--p-faint); border-bottom: 1.5px solid var(--p-faint);
  transform: rotate(45deg); transform-origin: center;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.a-faq details[open] summary::after { transform: rotate(-135deg); }
.a-faq details p {
  margin: 0 0 1.3rem; color: var(--p-quiet); font-size: 1.0625rem;
  max-width: 38rem;
}

/* ----------------------------------------------------------------- endmatter */
.a-end { grid-column: wide; margin-top: 5rem; padding-top: 2.2rem; border-top: 1px solid var(--p-rule); }
.a-end-in { max-width: 44rem; }

.a-author-card { margin: 0 0 3rem; max-width: 34rem; }
.a-author-card .a-byline-name { display: block; margin-bottom: .5rem; }
.a-author-card p { margin: 0; font-size: .9375rem; line-height: 1.65; color: var(--p-quiet); }

.a-cta {
  margin: 0 0 3rem; padding: 2rem 0 0; border-top: 1px solid var(--p-rule);
  max-width: 34rem;
}
.a-cta h3 {
  font-family: var(--p-display); font-size: 1.55rem; font-weight: 750;
  letter-spacing: -.03em; color: var(--p-ink); margin: 0 0 .5rem;
}
.a-cta p { font-size: 1rem; color: var(--p-quiet); margin: 0 0 1.3rem; }
.a-cta-btn {
  display: inline-block; background: var(--p-ink); color: var(--p-bg);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  padding: .8rem 1.5rem; border-radius: 2px;
  transition: background .15s ease;
}
.a-cta-btn:hover { background: var(--p-body); }
.a-cta-alt {
  display: inline-block; margin-left: 1.1rem; font-size: .875rem;
  color: var(--p-quiet); text-decoration: underline;
  text-underline-offset: .18em; text-decoration-color: var(--p-rule-2);
}
.a-cta-alt:hover { color: var(--p-ink); }

.a-more h4 {
  font-size: .6875rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--p-faint); margin: 0 0 .3rem;
}
.a-more ul { list-style: none; margin: 0; padding: 0; }
.a-more li { border-bottom: 1px solid var(--p-rule); }
.a-more li:first-child { border-top: 1px solid var(--p-ink); }
.a-more a {
  display: block; padding: .95rem 0;
  font-family: var(--p-display); font-size: 1.1875rem; font-weight: 650;
  letter-spacing: -.024em; color: var(--p-ink); text-decoration: none;
  transition: color .15s ease;
}
.a-more a:hover { color: var(--p-ink); opacity: .6; }

/* -------------------------------------------------------------------- footer */
.a-foot {
  border-top: 1px solid var(--p-rule); margin-top: 5rem;
  padding: 1.8rem 0 4rem; font-size: .8125rem; color: var(--p-faint);
}
.a-foot-in {
  max-width: 76rem; margin: 0 auto; padding: 0 2rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}
.a-foot a { color: var(--p-quiet); text-decoration: none; }
.a-foot a:hover { color: var(--p-ink); text-decoration: underline; text-underline-offset: .18em; }

/* ============================================================ legacy classes
   Migrated bodies carry .docs-callout and .docs-steps from the old layout.
   Restyled here rather than rewriting thirteen bodies of prose. */
.docs-callout {
  grid-column: wide; display: flex; gap: 1rem; align-items: flex-start;
  margin: 2.6rem 0; padding: 1.3rem 0 1.3rem 1.6rem;
  border-left: 1px solid var(--p-accent); max-width: 44rem;
}
.docs-callout p { margin: 0; font-size: 1.0625rem; color: var(--p-quiet); }
.docs-callout p + p { margin-top: .8rem; }
.docs-callout-icon { display: none; }
.docs-callout-title { font-weight: 600; color: var(--p-ink); margin-bottom: .35rem; }
.docs-callout.warn { border-left-color: var(--p-warn); }
.docs-steps { counter-reset: s; list-style: none; padding: 0; margin: 2rem 0; }
.docs-steps > li { position: relative; padding-left: 2.2rem; margin-bottom: 1.1rem; counter-increment: s; }
.docs-steps > li::before {
  content: counter(s); position: absolute; left: 0; top: .1em;
  font-family: var(--p-display); font-size: 1.05rem; font-weight: 700;
  color: var(--p-accent); font-variant-numeric: tabular-nums;
}
.docs-status { font-weight: 600; color: var(--p-accent); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .a-wrap {
    grid-template-columns: [full-start wide-start text-start] minmax(0, 1fr) [text-end wide-end full-end];
    padding: 0 2rem;
  }
  .a-wrap > *, .a-body > * { grid-column: text; }
  .a-fig, .a-note, .a-pull, .a-table-wrap, .docs-table, .docs-callout, .a-end, .a-head { max-width: 42rem; }
  .a-head-in { max-width: none; }
}
@media (max-width: 720px) {
  body { font-size: 1.0625rem; line-height: 1.66; }
  .a-wrap, .a-bar-in, .a-foot-in { padding-left: 1.25rem; padding-right: 1.25rem; }
  .a-head { padding-top: 3rem; }
  .a-byline { margin-bottom: 2.4rem; }
  .a-body > p:first-of-type::first-letter { font-size: 3.2em; }
  .a-body h2 { margin-top: 2.8rem; }
  .a-fig { margin: 2.2rem 0; }
  .a-fig figcaption { padding-left: .8rem; }
  .a-cta-alt { display: block; margin: 1rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .a-bar, .a-progress, .a-rail, .a-cta, .a-more, .a-foot { display: none; }
  .a-wrap { display: block; max-width: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
}
