/* ============================================================
   OrgKit Guides — shared article styling
   Loaded AFTER orgkit-shared.css so it inherits the design tokens
   (--bg, --s1, --tx, --acc, --mono, --display, --body, --r, --rl).
   Used only by /guides/* pages. No tool page depends on this file.
   ============================================================ */

/* --gd-label: muted small text that still passes WCAG AA.
   The shared --tx3 (#686c78) is only 3.53:1 on --s1 and 3.73:1 on --bg, which
   fails AA for text under 18px — and every label using it here is 10-11px.
   #868b96 measures 5.42 / 5.72 / 5.08 on --s1 / --bg / --s2 and is still clearly
   dimmer than --tx2, so the visual hierarchy survives. Scoped to guide pages;
   the global --tx3 token is untouched. */
:root { --gd-label: #868b96 }

.gd-main { max-width: 760px; margin: 0 auto; padding: 40px 24px 88px }

.gd-crumb { font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--gd-label); margin-bottom: 18px }
.gd-crumb a { color: var(--gd-label); text-decoration: none }
.gd-crumb a:hover { color: var(--acc) }

/* Keyboard focus — without this, keyboard and switch users get no indication
   of where they are. Amber ring on dark surfaces, light ring on the amber button. */
.gd-main a:focus-visible,
.gd-foot a:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 2px }
.gd-main a.gd-cta-btn:focus-visible { outline: 2px solid var(--tx); outline-offset: 3px }

.gd-main h1 { font-family: var(--display); font-size: clamp(26px, 4vw, 38px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.15; margin: 0 0 14px; color: var(--tx) }
.gd-lede { font-size: 16px; color: var(--tx2); line-height: 1.7; margin: 0 0 8px }
.gd-meta { font-family: var(--mono); font-size: 11px; color: var(--gd-label); margin: 0 0 34px }

.gd-main h2 { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.01em;
  margin: 44px 0 12px; color: var(--tx); scroll-margin-top: 70px }
.gd-main h3 { font-size: 15px; font-weight: 600; margin: 26px 0 8px; color: var(--tx) }
.gd-main p { font-size: 14.5px; color: var(--tx2); line-height: 1.75; margin: 0 0 12px }
.gd-main a { color: var(--acc) }
.gd-main strong { color: var(--tx); font-weight: 600 }

.gd-main ul, .gd-main ol { margin: 0 0 14px; padding-left: 20px }
.gd-main li { font-size: 14.5px; color: var(--tx2); line-height: 1.75; margin-bottom: 6px }

.gd-err { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--danger);
  background: var(--danger-faint); border: 1px solid var(--danger-dim); border-left: 3px solid var(--danger);
  border-radius: 0; padding: 14px 16px; margin: 0 0 26px; overflow-x: auto; white-space: pre-wrap; word-break: break-word }

.gd-code { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--tx);
  background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r);
  padding: 14px 16px; margin: 0 0 16px; overflow-x: auto; white-space: pre }
.gd-code .c { color: var(--gd-label) }
.gd-code .k { color: var(--acc) }

.gd-main code { font-family: var(--mono); font-size: 12.5px; background: var(--s2);
  border: 1px solid var(--b1); padding: 1px 6px; border-radius: 4px; color: var(--tx); word-break: break-word }

.gd-note { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl);
  padding: 16px 18px; margin: 18px 0 }
.gd-note.warn { border-color: var(--acc-dim); background: var(--acc-faint) }
.gd-note .gd-note-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gd-label); margin-bottom: 6px }
.gd-note.warn .gd-note-k { color: var(--acc) }
.gd-note p:last-child { margin-bottom: 0 }

.gd-tbl { width: 100%; border-collapse: collapse; margin: 6px 0 20px; font-size: 13.5px }
.gd-tbl th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gd-label); font-weight: 500;
  border-bottom: 1px solid var(--b2); padding: 8px 10px 8px 0 }
.gd-tbl td { color: var(--tx2); border-bottom: 1px solid var(--b1); padding: 10px 10px 10px 0;
  vertical-align: top; line-height: 1.6 }
.gd-tbl td:first-child { color: var(--tx); white-space: nowrap }

.gd-faq { margin: 8px 0 0 }
.gd-faq .gd-q { font-size: 14.5px; font-weight: 600; color: var(--tx); margin: 22px 0 6px }
.gd-faq .gd-a { font-size: 14.5px; color: var(--tx2); line-height: 1.75; margin: 0 }

.gd-cta { background: var(--s1); border: 1px solid var(--acc-dim); border-radius: var(--rl);
  padding: 22px 24px; margin: 40px 0 0 }
.gd-cta h2 { margin: 0 0 8px; font-size: 18px }
.gd-cta p { margin-bottom: 14px }
/* Selector must out-specify `.gd-main a` above (0,1,1), or the amber link colour
   wins and paints amber text on the amber button — invisible. Qualifying with the
   element type takes this to (0,2,1).
   min-height 44px meets WCAG 2.5.5: padding alone gave ~36px, below the
   comfortable-tap threshold on touch devices. */
.gd-main a.gd-cta-btn { display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--display); font-size: 13.5px; font-weight: 600;
  color: var(--bg); background: var(--acc); border-radius: var(--r); padding: 0 22px;
  text-decoration: none; border: 0 }
.gd-main a.gd-cta-btn:hover { background: var(--acc-hi); color: var(--bg); text-decoration: none }

.gd-rel { margin: 44px 0 0; border-top: 1px solid var(--b1); padding-top: 22px }
.gd-rel h2 { font-size: 15px; margin: 0 0 10px }
.gd-rel ul { list-style: none; padding: 0; margin: 0 }
.gd-rel li { margin-bottom: 7px }

.gd-foot { border-top: 1px solid var(--b1); padding: 22px 24px; text-align: center;
  color: var(--gd-label); font-size: 12px }
.gd-foot a { color: var(--tx2) }

@media (max-width: 640px) {
  .gd-main { padding: 28px 18px 64px }
  .gd-tbl td:first-child { white-space: normal }
  /* three-column tables get tight below ~400px — trim the type and gutters
     rather than letting cells collapse into unreadable slivers */
  .gd-tbl { font-size: 12.5px }
  .gd-tbl th, .gd-tbl td { padding: 8px 8px 8px 0 }
  .gd-cta { padding: 18px 18px }
  .gd-main h1 { font-size: 24px }
}
