/* my-app.engineer — shared stylesheet for the static public pages (/docs/*, /legal/*, /404).
   Same palette + type as the landing: one accent (#3fb950), IBM Plex Sans/Mono, no gradients. */
:root {
  --bg: #0d1117; --surface: #161b22; --raised: #1c2128;
  --line: rgba(255,255,255,.08); --line-h: rgba(255,255,255,.16);
  --ink: #e6edf3; --ink-2: #c9d1d9; --muted: #8b949e; --faint: #6e7681;
  --brand: #3fb950; --brand-h: #46c75a; --brand-ink: #04100a; --brand-text: #56d364; --brand-dim: rgba(63,185,80,.12);
  --link: #58a6ff; --warn: #d29922; --bad: #f85149;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0 0 1rem; }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: var(--ink-2); }
pre { margin: 0 0 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font: 400 13px/1.6 var(--mono); color: var(--ink-2); }
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
pre .p { color: var(--brand-text); }
pre .c { color: var(--faint); }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: .4rem; }
li::marker { color: var(--muted); }
strong, b { font-weight: 600; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ── header (same lockup as the landing) ── */
.hd { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.hd-in { width: min(1120px, 100% - 48px); margin: 0 auto; height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.mark { width: 26px; height: 26px; flex: none; color: var(--ink); }
.wm { font: 500 15px/1 var(--mono); letter-spacing: -.01em; display: inline-flex; align-items: baseline; }
.wm .d { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin: 0 2px; transform: translateY(-1px); }
.hd-sec { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding-left: 20px; border-left: 1px solid var(--line); }
.hd-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hd-nav a { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 6px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.hd-nav a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 6px; font-weight: 500; font-size: 14.5px; border: 1px solid var(--line-h); color: var(--ink); background: var(--surface); white-space: nowrap; }
.btn:hover { background: var(--raised); text-decoration: none; }
.btn-live { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn-live:hover { background: var(--brand-h); border-color: var(--brand-h); }
.hd-nav .btn { height: 36px; color: var(--brand-ink); }

/* ── layout: sidebar + article ── */
.page { width: min(1120px, 100% - 48px); margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding: 40px 0 96px; }
.page.single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.side { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.side h4 { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.side ul { list-style: none; padding: 0; margin: 0 0 24px; }
.side li { margin: 0; }
.side a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); border-left: 2px solid transparent; }
.side a:hover { background: var(--surface); text-decoration: none; color: var(--ink); }
.side a.on { color: var(--ink); border-left-color: var(--brand); background: var(--surface); }
article { max-width: 720px; }
.crumbs { font: 400 12.5px/1 var(--mono); color: var(--faint); margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
article h1 { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.12; margin-bottom: 12px; }
.lede { font-size: 18px; color: var(--ink-2); margin-bottom: 32px; }
article h2 { font-size: 22px; margin: 44px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
article h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 32px; }
article h3 { font-size: 17px; margin: 26px 0 8px; }
article p, article li { color: var(--ink-2); }
.updated { font: 400 12.5px/1.5 var(--mono); color: var(--faint); margin-bottom: 28px; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface); border-radius: 6px; padding: 12px 16px; margin: 0 0 1.25rem; font-size: 15px; }
.note.warn { border-left-color: var(--warn); }
.note p:last-child { margin: 0; }
.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 18px; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 2px; font: 500 12.5px/1 var(--mono); color: var(--brand-text); }
.steps b { display: block; color: var(--ink); margin-bottom: 2px; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 14.5px; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 1.5rem; }
.tbl table { margin: 0; min-width: 560px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
tr:last-child td { border-bottom: 0; }
td.yes::before { content: '✓ '; color: var(--brand-text); font-family: var(--mono); }
td.no::before { content: '× '; color: var(--muted); font-family: var(--mono); }
tr.us td { background: var(--brand-dim); color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 1.5rem; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; color: var(--ink); }
.card:hover { border-color: var(--line-h); text-decoration: none; }
.card b { display: block; font-weight: 600; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 14px; }
.next { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; }
.next a { color: var(--ink-2); }
.next a:hover { color: var(--ink); }

/* ── footer ── */
footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--faint); font: 400 12.5px/1.6 var(--mono); }
.ft-in { width: min(1120px, 100% - 48px); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.ft-in a { color: var(--muted); margin-left: 14px; }

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .side { position: static; display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .side h4 { display: none; }
  .side ul { display: contents; }
  .side a { border: 1px solid var(--line); border-left-width: 1px; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
  .side a.on { border-color: var(--brand); }
  .hd-sec, .hd-nav a:not(.btn) { display: none; }
  .cards { grid-template-columns: 1fr; }
}

/* ── /learn — the answer pages ────────────────────────────────────────────────────────────────
 *
 * A learn page competes for somebody typing a question into Google, so its shape is doing work the
 * docs pages do not need. The answer block is what a featured snippet gets cut from and it sits above
 * everything; the contents is the plainest signal a crawler gets that this is a document; the related
 * list is how a library of answers compounds instead of being a pile of orphans.
 */
.learn .answer {
  font-size: 1.12rem; line-height: 1.65; margin: 0 0 1rem;
  padding: 1rem 1.15rem; border-left: 3px solid var(--brand);
  background: var(--panel-2, rgba(127,127,127,.06)); border-radius: 0 10px 10px 0;
}
.learn .updated { font-size: .82rem; opacity: .7; margin: 0 0 1.6rem; }
.learn h2 { scroll-margin-top: 5rem; }   /* an anchored jump must not land under the header */
.learn h3 { scroll-margin-top: 5rem; }

.toc { margin: 0 0 2rem; padding: .9rem 1.15rem; border: 1px solid var(--line, rgba(127,127,127,.22)); border-radius: 10px; }
.toc h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .65; margin: 0 0 .55rem; }
.toc ol { margin: 0; padding-left: 1.15rem; }
.toc li { margin: .3rem 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.more { margin: 2.6rem 0 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line, rgba(127,127,127,.22)); }
.more h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .65; margin: 0 0 .6rem; }
.more ul { margin: 0; padding-left: 1.15rem; }
.more li { margin: .4rem 0; }
/* The related page's own summary, on its own line rather than joined to the title with a dash. */
.more li .d { display: block; opacity: .7; font-size: .92em; margin-top: .1rem; }

.learn .cta { margin: 2rem 0 0; }

.learn-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.learn-list li { padding: .95rem 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.18)); }
.learn-list li:last-child { border-bottom: 0; }
.learn-list a { text-decoration: none; font-size: 1.05rem; }
.learn-list a:hover { text-decoration: underline; }
.learn-list span { display: block; opacity: .72; font-size: .93rem; margin-top: .2rem; }

/* ── a figure in an answer ──────────────────────────────────────────────────
   An article is 720px and a diagram is drawn at whatever width its own parts
   need, so without this the wide ones push the whole PAGE sideways — the same
   overflow the landing page's halves had. The intrinsic width and height stay
   on the <img> so the space is reserved before it loads; these only scale it
   down to the column it lives in. */
article figure { margin: 34px 0; }
article figure img { display: block; width: 100%; height: auto; }
article figure figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
