/* =========================================================================
   Mockstack — Guide articles
   Long-form article style. Inherits the Bold landing aesthetic but tightens
   line-length for reading and adds spec tables.
   ========================================================================= */

:root {
  /* Colour tokens + --wrap live in chrome.css (loaded after this file). */
  /* --card now comes from chrome.css (navy-3); it is defined once there. */
  --shadow-card:  0 1px 0 rgba(0,0,0,0.20), 0 18px 50px -24px rgba(0,0,0,0.60);
  --shadow-sm:    0 1px 0 rgba(0,0,0,0.20), 0 6px 20px -8px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p { margin: 0 0 14px; color: var(--ink-2); }
p:last-child { margin-bottom: 0; }
a { color: var(--coral); text-decoration: none; border-bottom: 1px solid rgba(11,99,229,0.3); }
a:hover { color: var(--coral-deep); border-bottom-color: currentColor; }

/* ===================== ARTICLE LAYOUT =================================== */
.article .crumb {
  font: 600 10px "JetBrains Mono", monospace;
  letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
  margin-bottom: 14px;
}
.article .crumb a { color: var(--mute); border: none; text-decoration: none; }
.article .crumb a:hover { color: var(--coral); }

.article {
  /* Same container and left edge as every other page. Prose is capped to a
     readable measure inside it rather than by narrowing the whole page, so an
     article and the home page line up. */
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px 32px 24px;
}
.article > header,
.article > p,
.article > ul,
.article > ol,
.article > h2,
.article > h3,
.article > .callout { max-width: 76ch; }
/* Tables and card grids earn the extra width. */
.article > .size-table,
.article > .related,
.article > .mid-cta { max-width: 100%; }

.article header {
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
}
.article header .kicker { color: var(--mute); margin-bottom: 18px; }
.article h1 {
  font-family: var(--display);
  font-weight: var(--display-w);
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 0.98;
  letter-spacing: var(--display-track);
  color: var(--ink);
  margin: 0 0 18px;
}
.article h1 .accent { color: var(--coral); }
.article .lede {
  font-size: 19px; line-height: 1.55; color: var(--ink);
  max-width: 60ch;
  margin: 0 0 16px;
}
.article .meta {
  font: 500 12px/1.5 "JetBrains Mono", monospace;
  color: var(--mute);
  display: flex; flex-wrap: wrap; gap: 18px;
}
.article .meta span b { color: var(--ink-2); font-weight: 600; }

/* Byline — sits under the header meta row, above the rule. */
.article .byline {
  font: 500 13px/1.5 "Inter", -apple-system, sans-serif;
  color: var(--mute);
  margin-top: 22px;
}
.article .byline b { color: var(--ink); font-weight: 600; }
.article .byline a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.article .byline a:hover,
.article .byline a:hover b { color: var(--coral); }

.article h2 {
  font-family: var(--display);
  font-weight: var(--display-w);
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.1; letter-spacing: var(--display-track);
  color: var(--ink);
  margin: 48px 0 16px;
}
.article h3 {
  font: 700 18px/1.3 "Inter", sans-serif;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 28px 0 10px;
}

.article ul { padding-left: 22px; margin: 0 0 18px; color: var(--ink-2); }
.article ul li { margin-bottom: 6px; line-height: 1.55; }
.article ul li::marker { color: var(--coral); }

strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }
code {
  font: 500 13px/1 "JetBrains Mono", monospace;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid var(--rule);
}

/* ===================== SIZE TABLE ======================================= */
.size-table {
  width: 100%;
  margin: 8px 0 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.size-table .head {
  background: var(--paper-2);
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: baseline; gap: 14px;
}
.size-table .head h3 {
  font: 700 14px "Inter", sans-serif;
  margin: 0;
  letter-spacing: -0.005em;
}
.size-table .head .badge {
  font: 600 9px "JetBrains Mono", monospace;
  letter-spacing: 0.15em; text-transform: uppercase;
  background: var(--gold); color: var(--navy);
  padding: 3px 7px; border-radius: 3px;
}
.size-table .head .badge.optional { background: var(--mute-2); }
.size-table table { width: 100%; border-collapse: collapse; }
.size-table th, .size-table td {
  text-align: left; padding: 10px 20px;
  font-size: 14px;
  border-bottom: 1px dashed var(--rule);
}
.size-table th {
  font: 600 11px "JetBrains Mono", monospace;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--mute);
  background: rgba(187,211,245,0.30);
}
.size-table tr:last-child td { border-bottom: none; }
.size-table .verified {
  padding: 9px 20px; border-top: 1px solid var(--rule);
  background: var(--paper-2);
  font: 500 11px var(--mono); color: var(--mute); letter-spacing: .03em;
}
.size-table td.dim {
  font: 500 14px "JetBrains Mono", monospace;
  color: var(--ink);
  white-space: nowrap;
}
.size-table td.dim b { color: var(--coral-deep); }
.size-table td.req {
  font: 600 11px "JetBrains Mono", monospace;
  color: var(--mute);
  text-transform: uppercase;
}
.size-table td.req.yes { color: var(--success); }
.size-table td.req.no { color: var(--mute-2); }

/* ===================== CALLOUTS ========================================= */
.callout {
  background: var(--coral-soft);
  border: 1px solid rgba(11,99,229,0.25);
  border-radius: 6px;
  padding: 16px 18px 18px;
  margin: 24px 0;
  display: grid; grid-template-columns: auto 1fr; gap: 14px;
  align-items: start;
}
.callout .ico {
  font: 700 14px/1 "JetBrains Mono", monospace;
  color: var(--coral); padding-top: 2px;
}
.callout p { margin: 0; color: var(--ink); font-size: 14.5px; line-height: 1.55; }
.callout p strong { color: var(--coral-deep); }

.tip {
  background: var(--paper-2);
  border-left: 3px solid var(--coral);
  border-radius: 0 6px 6px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ===================== MID-ARTICLE CTA ================================== */
.mid-cta {
  background: var(--navy-2);
  color: var(--text);
  border-radius: 10px;
  padding: 32px 34px;
  margin: 44px 0;
  display: grid; grid-template-columns: 1fr auto; gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-card);
}
.mid-cta h3 {
  font-family: var(--display);
  font-weight: var(--display-w);
  font-size: 30px; line-height: 1.05; letter-spacing: var(--display-track);
  color: var(--text); margin: 0 0 6px;
}
.mid-cta h3 .accent { color: var(--coral); }
.mid-cta p { color: color-mix(in srgb, var(--paper) 70%, transparent); font-size: 14px; margin: 0; }
.mid-cta a {
  background: var(--gold); color: var(--navy);
  border: none; padding: 14px 22px; border-radius: var(--radius-btn);
  font: 600 14px "Inter", sans-serif;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.mid-cta a:hover { background: var(--gold-hi); color: var(--navy); }
.mid-cta a::after { content: "→"; font: 700 14px "JetBrains Mono", monospace; }

/* ===================== RELATED ========================================== */
.related {
  margin: 56px 0 0;
  padding: 36px 0 0;
  border-top: 1px solid var(--rule);
}
.related h2 { margin-top: 0; }
/* An article ends with two link clusters: the tools that do the thing it just
   described, then further reading. The second cluster already has a rule above
   it, so it does not need the full 56px gap as well. */
.related + .related { margin-top: 40px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 18px; }
.related-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 18px 18px 16px;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.12s, transform 0.08s;
  display: flex; flex-direction: column; gap: 6px;
}
.related-card:hover { border-color: var(--coral); transform: translateY(-1px); color: inherit; }
.related-card .num { font: 600 10px "JetBrains Mono", monospace; color: var(--mute); letter-spacing: 0.1em; }
/* Tool cards carry the accent on the eyebrow so the two clusters stay
   distinguishable when a reader skims past the headings. */
.related-card.tool .num { color: var(--coral); }
.related-card h4 { font: 600 14px/1.3 "Inter", sans-serif; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.related-card p { font-size: 12.5px; line-height: 1.4; margin: 0; }

@media (max-width: 800px) {
  .nav .crumb { display: none; }
  .article { padding: 40px 22px 24px; }
  .mid-cta { grid-template-columns: 1fr; padding: 24px 22px; }
  .mid-cta a { justify-self: start; }
  .related-grid { grid-template-columns: 1fr; }
  .size-table th, .size-table td { padding: 9px 14px; font-size: 13px; }
  .size-table td.dim { font-size: 13px; }

  /* Meta and card copy set for a desktop column, read on a phone. */
  .article .byline { font-size: 13.5px; line-height: 1.5; }
  .related-card { padding: 15px; }
  .related-card p { font-size: 14px; line-height: 1.45; }
  .related-card h4 { font-size: 15px; }
}

