/* =========================================================================
   Articles: guides and the site pages (About, Contact, Privacy, Terms,
   Author). Builds on marker.css and its tokens, so light and dark both
   work. The markup is the long-standing article markup:

     <article class="article">
       <header> .kicker, h1 (.accent), .lede, .meta, .byline </header>
       h2, h3, p, ul, ol, pre, .size-table, .callout, .tip, .mid-cta,
       .related > .related-grid > .related-card
     </article>
   ========================================================================= */

.pg-article main { padding-bottom: var(--s8); }

.article {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--s7) var(--gutter) var(--s5);
}
.article > :is(header, p, ul, ol, h2, h3, h4, .callout, .tip, dl, blockquote, pre, figure) { max-width: 72ch; }
.article > :is(.size-table, .related, .mid-cta) { max-width: 100%; }
/* A heading too long for the 72ch column (FAQ) gets the full width; the rest of the header keeps the reading measure. */
.article > header.head-wide { max-width: none; }
.article > header.head-wide > :not(h1) { max-width: 72ch; }

/* ---- Header ---------------------------------------------------------- */
.article .crumb { margin: 0 0 var(--s3); font-size: 14px; line-height: 20px; color: var(--muted); }
.article .crumb a { color: var(--muted) !important; text-decoration: none !important; }
.article .crumb a:hover { color: var(--marker-text) !important; }
.article > header {
  margin-bottom: var(--s7);
  padding-bottom: var(--s6);
  border-bottom: 1px solid var(--line);
}
.article .kicker {
  display: inline-block;
  margin: 0 0 var(--s4);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}
.article h1 {
  margin: 0 0 var(--s4);
  font: 800 56px/1 var(--font-head);
  letter-spacing: -.035em;
  color: var(--ink);
}
.article h1 .accent { color: var(--marker); }
.article .lede {
  max-width: 60ch;
  margin: 0 0 var(--s4);
  font-size: 19px;
  line-height: 30px;
  color: var(--ink-2);
}
.article .meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin: var(--s4) 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}
.article .meta b { color: var(--ink); font-weight: 600; }
.article .byline { margin: var(--s4) 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.article .byline a { color: var(--ink); }
.article .byline b { font-weight: 600; }

/* ---- Body copy --------------------------------------------------------- */
.article h2 {
  margin: var(--s7) 0 var(--s4);
  font: 700 28px/34px var(--font-head);
  letter-spacing: -.02em;
  color: var(--ink);
}
.article h3 {
  margin: var(--s5) 0 var(--s2);
  font: 700 20px/26px var(--font-head);
  letter-spacing: -.015em;
  color: var(--ink);
}
.article h4 { margin: var(--s4) 0 var(--s2); font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); }
.article p, .article li, .article dd { font-size: 16px; line-height: 25px; color: var(--ink-2); }
.article p { margin: 0 0 var(--s4); }
.article :is(ul, ol) { margin: 0 0 var(--s4); padding-left: 22px; }
.article li { margin-bottom: var(--s2); }
.article li::marker { color: var(--muted); }
.article strong, .article b { color: var(--ink); font-weight: 600; }
.article a:not(.related-card):not(.btn) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--control-border);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.article a:not(.related-card):not(.btn):hover { color: var(--marker-text); text-decoration-color: currentColor; }
.article dl { margin: 0 0 var(--s4); }
.article dt { margin-top: var(--s4); font-weight: 600; color: var(--ink); }
.article dd { margin: var(--s1) 0 0; }
.article blockquote { margin: var(--s5) 0; padding-left: var(--s4); border-left: 3px solid var(--line); }

.article code {
  padding: 1px 6px;
  border-radius: var(--r-chip);
  background: var(--raised);
  color: var(--ink);
  font: 500 .9em/1 var(--font-code);
}
.article pre {
  margin: 0 0 var(--s5);
  padding: var(--s4) var(--s5);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  font: 400 14px/1.7 var(--font-code);
  color: var(--ink);
}
.article pre code { padding: 0; background: none; border: 0; font: inherit; }

/* ---- Spec tables ------------------------------------------------------- */
.size-table {
  margin: var(--s2) 0 var(--s6);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}
.size-table .head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--line);
  background: var(--raised);
}
.size-table .head h3 { margin: 0; font: 600 16px/24px var(--font-body); letter-spacing: 0; }
.size-table .badge {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--surface);
  font: 600 12px/16px var(--font-body);
}
.size-table .badge.optional { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--control-border); }
.size-table .scroll, .size-table > div:not(.head):not(.verified) { overflow-x: auto; }
.size-table table { width: 100%; border-collapse: collapse; }
.size-table :is(th, td) {
  padding: 10px var(--s5);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-2);
}
.size-table th { font-weight: 600; color: var(--muted); background: var(--surface); }
.size-table tr:last-child td { border-bottom: 0; }
.size-table td.dim { font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.size-table td.dim b { color: var(--ink); }
.size-table td.req { font-weight: 600; color: var(--muted); }
.size-table td.req.yes { color: var(--success); }
.size-table .verified {
  padding: var(--s2) var(--s5);
  border-top: 1px solid var(--line);
  background: var(--raised);
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

/* ---- Callouts ---------------------------------------------------------- */
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  align-items: start;
  margin: var(--s5) 0;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}
.callout .ico { display: flex; padding-top: 4px; color: var(--marker); }
.callout .ico .icon { width: 18px; height: 18px; }
.callout p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-2); }
.tip {
  margin: var(--s5) 0;
  padding: var(--s4) var(--s5);
  border-radius: var(--r-card);
  background: var(--raised);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-2);
}

/* What Changed: dated spec changes, each linked to its source. */
.article .tip.changes p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink); }
.article .tip.changes ul { margin: var(--s2) 0 0; padding-left: 20px; }
.article .tip.changes li { margin: 0; font-size: 15px; line-height: 24px; }
.article .tip.changes li + li { margin-top: var(--s1); }
.article .sources { font-size: 14px; line-height: 22px; color: var(--muted); }

/* ---- Mid-article call to action --------------------------------------- */
.mid-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s5);
  align-items: center;
  margin: var(--s7) 0;
  padding: var(--s6);
  border-radius: var(--r-stage);
  background: var(--marker-tint);
}
.mid-cta h3 { margin: 0 0 var(--s2); font: 800 28px/34px var(--font-head); letter-spacing: -.02em; color: var(--ink); }
.mid-cta h3 .accent { color: var(--marker-text); }
.mid-cta p { margin: 0; font-size: 16px; line-height: 25px; color: var(--ink-2); }
.mid-cta a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 52px;
  padding: 0 22px;
  border-radius: var(--r-control);
  background: var(--marker);
  color: var(--on-marker) !important;
  font: 600 16px/20px var(--font-body);
  text-decoration: none !important;
  white-space: nowrap;
}
.mid-cta a:hover { background: var(--marker-hover); }

/* ---- Related ----------------------------------------------------------- */
.related { margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.related-card {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .12s ease;
}
.related-card:hover { border-color: var(--ink); }
.related-card .num { font-size: 13px; line-height: 18px; color: var(--muted); }
.related-card :is(h3, h4) { margin: 0; font: 700 20px/26px var(--font-head); letter-spacing: -.015em; color: var(--ink); }
.related-card p { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---- Contact and small extras ------------------------------------------ */
.email-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  max-width: 72ch;
  margin: var(--s5) 0 var(--s2);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}
/* Not a mailto on purpose: copy the address into your own client. */
.email-box code {
  flex: 1 1 auto;
  min-width: 220px;
  padding: 0;
  background: none;
  font: 500 17px/24px var(--font-code);
  user-select: all;
  -webkit-user-select: all;
}
.email-box button {
  height: 40px;
  padding: 0 var(--s4);
  border: 0;
  border-radius: var(--r-control);
  background: var(--ink);
  color: var(--surface);
  font: 600 14px/20px var(--font-body);
  cursor: pointer;
}
.email-box button:hover { background: var(--marker); color: var(--on-marker); }
.email-box button.copied { background: var(--success); color: #fff; }

@media (max-width: 760px) {
  .article { padding: var(--s6) 16px var(--s4); }
  .article h1 { font-size: 40px; }
  .article .lede { font-size: 17px; line-height: 27px; }
  .article h2 { margin-top: var(--s6); font-size: 24px; line-height: 30px; }
  .size-table :is(th, td) { padding: 10px var(--s3); }
  .size-table .head { padding: var(--s3); }
  /* Tables placed straight in the card scroll sideways on a phone. */
  .size-table > table { display: block; overflow-x: auto; }
  .mid-cta { grid-template-columns: 1fr; padding: var(--s5); }
  .mid-cta a { justify-self: start; height: 48px; }
}

/* ---- Ship Your App walkthrough ---------------------------------------- */
.sy-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); margin-top: var(--s5); }
.sy-tabs { width: 280px; }
.sy-progress { display: flex; align-items: center; gap: var(--s3); flex: 1 1 260px; }
.sy-track { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--raised); overflow: hidden; }
.sy-track i { display: block; height: 100%; width: 0; background: var(--marker); transition: width .2s ease; }
.sy-pct { font-size: 14px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.article > .sy-steps { max-width: 100%; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.sy-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s4);
  align-items: center;
  margin: 0;
  padding: var(--s5) 0;
  border-bottom: 1px solid var(--line);
}
.sy-n {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--control-border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font: 700 16px/1 var(--font-body);
  cursor: pointer;
}
.sy-n:hover { border-color: var(--ink); }
.sy-n .icon { display: none; }
.sy-n[aria-pressed="true"] { border-color: var(--marker); background: var(--marker); color: var(--on-marker); }
.sy-n[aria-pressed="true"] span { display: none; }
.sy-n[aria-pressed="true"] .icon { display: block; }
.sy-body h2 { margin: 0 0 var(--s1); font: 700 20px/26px var(--font-head); letter-spacing: -.015em; }
.sy-body p { margin: 0; font-size: 15px; line-height: 23px; }
.sy-body .sy-spec { margin-top: var(--s2); font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }
.sy-step.done .sy-body h2 { color: var(--muted); }
.sy-go { white-space: nowrap; text-decoration: none !important; }
@media (max-width: 760px) {
  .sy-tabs { width: 100%; }
  .sy-step { grid-template-columns: auto 1fr; padding: var(--s4) 0; }
  .sy-go { grid-column: 2; justify-self: start; }
}

/* ---- Questions page ---------------------------------------------------- */
.article > .faq-list { max-width: 72ch; border-top: 1px solid var(--line); }
.article .faq-list details p { max-width: none; }

/* ---- Guides index ------------------------------------------------------ */
.gd-head { display: flex; flex-direction: column; gap: 14px; padding: 56px 0 40px; }
.gd-head .pg-h1 { max-width: 900px; }
.gd-head .pg-lead { font-size: 18px; max-width: 600px; }

.gd-tag { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.gd-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Start here: the walkthrough, then four sizes people look up most. */
.gd-start { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; padding-bottom: 72px; }
.gd-hero {
  --hero-ink: var(--surface);
  --hero-muted: color-mix(in srgb, var(--surface) 68%, transparent);
  display: flex; flex-direction: column; gap: 12px; padding: 32px;
  border-radius: var(--r-stage); background: var(--ink); color: var(--hero-ink); text-decoration: none;
}
.gd-hero-top { display: flex; justify-content: space-between; gap: 12px; }
.gd-hero .gd-tag, .gd-hero .gd-time { color: var(--hero-muted); }
.gd-hero-name { font: 800 40px/1.05 var(--font-head); letter-spacing: -.03em; }
.gd-hero-desc { max-width: 460px; font-size: 16px; line-height: 1.5; color: var(--hero-muted); }
.gd-hero-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0 8px; padding: 18px 0 0; list-style: none; border-top: 1px solid color-mix(in srgb, var(--surface) 18%, transparent); }
.gd-hero-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.gd-hero-steps i { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: color-mix(in srgb, var(--surface) 14%, transparent); font-style: normal; font-size: 12px; font-variant-numeric: tabular-nums; }
.gd-hero-go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font-size: 15px; font-weight: 700; }
.gd-hero-go .icon { transition: transform .15s ease; }
.gd-hero:hover .gd-hero-go .icon { transform: translateX(3px); }

.gd-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gd-spec {
  display: flex; flex-direction: column; gap: 6px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--r-stage); background: var(--surface);
  color: var(--ink); text-decoration: none; transition: border-color .12s ease;
}
.gd-spec b { margin-top: auto; padding-top: 18px; font: 800 30px/1.1 var(--font-head); letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gd-spec-note { font-size: 14px; color: var(--ink-2); }
.gd-spec:hover { border-color: var(--ink); }

/* Library: topics on the left, cards on the right. */
.gd-lib { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding: 40px 0 96px; border-top: 1px solid var(--line); }
.gd-side { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.gd-side-h { margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.gd-side a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; margin: 0 -12px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.gd-side a span { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.gd-side a:hover { background: var(--raised); color: var(--ink); }
.gd-side a.gd-side-ship { justify-content: flex-start; margin-top: 20px; color: var(--marker-text); }
.gd-main { display: flex; flex-direction: column; gap: 56px; min-width: 0; }
.gd-group { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 96px; }
.gd-group-head { display: flex; flex-direction: column; gap: 6px; }
.gd-group-head h2 { font: 800 28px/1.1 var(--font-head); letter-spacing: -.025em; }
.gd-group-head p { font-size: 15px; color: var(--muted); }
.gd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gd-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 56px 22px 24px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  color: var(--ink); text-decoration: none; transition: border-color .12s ease;
}
.gd-card-top { display: flex; justify-content: space-between; gap: 12px; }
.gd-card .gd-name { font: 700 19px/1.3 var(--font-head); letter-spacing: -.015em; }
.gd-card .gd-desc { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.gd-card > .icon { position: absolute; right: 22px; bottom: 24px; color: var(--muted); transition: transform .15s ease, color .15s ease; }
.gd-card:hover { border-color: var(--ink); }
.gd-card:hover > .icon { color: var(--marker-text); transform: translateX(3px); }

@media (max-width: 1100px) {
  .gd-start { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .gd-lib { grid-template-columns: 1fr; gap: 24px; }
  .gd-side { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .gd-side-h { display: none; }
  .gd-side a { margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
  .gd-side a.gd-side-ship { margin-top: 0; }
}
@media (max-width: 720px) {
  .gd-head { padding: 20px 0 28px; gap: 12px; }
  .gd-start { gap: 12px; padding-bottom: 48px; }
  .gd-hero { padding: 24px; }
  .gd-hero-name { font-size: 30px; }
  .gd-hero-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-specs { gap: 12px; }
  .gd-spec { padding: 18px; }
  .gd-spec b { font-size: 22px; padding-top: 12px; }
  .gd-grid { grid-template-columns: 1fr; gap: 12px; }
  .gd-main { gap: 40px; }
  .gd-lib { padding: 28px 0 64px; }
}
.pg-ship .article > header, .article > header:has(+ .faq-list) { margin-bottom: var(--s6); padding-bottom: 0; border-bottom: 0; }
