/* askbowtie /learn — same warm-paper tokens as the docs hub. */
:root{
  --bg:#fbf8f1; --surface:#fffdf8; --ink:#181408; --dim:#6d6450; --faint:#9a9078;
  --line:#e8e0cc; --rule:#d9d0b8; --gold:#8f6400; --gold-bright:#c8961a;
  --gold-wash:rgba(200,150,26,.09);
  --serif:"Fraunces",Georgia,serif; --mono:"IBM Plex Mono",ui-monospace,monospace;
  --rail:clamp(20px,5.5vw,104px);
}
@media(prefers-color-scheme:dark){
  :root{
    --bg:#0e0c07; --surface:#16130b; --ink:#f0e8d4; --dim:#a99e84; --faint:#7d7259;
    --line:#2a2413; --rule:#3b341e; --gold:#e3ac3f; --gold-bright:#f0ba4c;
    --gold-wash:rgba(240,186,76,.07);
  }
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-font-smoothing:antialiased}
body{background:var(--bg);color:var(--ink);font-family:var(--serif);line-height:1.65}
/* Prevent any element from causing horizontal page overflow */
body{overflow-x:hidden}
::selection{background:var(--gold-bright);color:var(--bg)}
a:focus-visible{outline:2px solid var(--gold-bright);outline-offset:3px;border-radius:3px}

/* ── Header ─────────────────────────────────────────────── */
header.site{display:flex;justify-content:space-between;align-items:center;padding:24px var(--rail) 0}
.wordmark{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);
  font-family:var(--mono);font-size:14px;font-weight:500}
.mk{color:var(--gold-bright)}
.wordmark .mk{font-size:18px}
header.site nav.site-nav{display:flex;gap:22px;font-family:var(--mono);font-size:12.5px}
header.site nav.site-nav a{color:var(--dim);text-decoration:none}
header.site nav.site-nav a:hover,header.site nav.site-nav a[aria-current]{color:var(--ink)}

/* Hamburger button — hidden on desktop */
.nav-toggle{display:none;background:none;border:none;cursor:pointer;padding:10px;
  color:var(--ink);line-height:1;min-width:44px;min-height:44px;
  align-items:center;justify-content:center;border-radius:6px}
.nav-toggle:hover{background:var(--gold-wash)}
.nav-toggle:focus-visible{outline:2px solid var(--gold-bright);outline-offset:2px;border-radius:6px}
/* 3-line hamburger icon via box-shadow trick */
.nav-toggle .bar,.nav-toggle .bar::before,.nav-toggle .bar::after{
  display:block;width:20px;height:2px;background:currentColor;border-radius:2px;transition:transform .2s ease}
.nav-toggle .bar{position:relative}
.nav-toggle .bar::before,.nav-toggle .bar::after{content:'';position:absolute;left:0}
.nav-toggle .bar::before{top:-6px}
.nav-toggle .bar::after{top:6px}

/* Mobile nav panel */
.mobile-nav{display:none;background:var(--bg);border-top:1px solid var(--line);
  padding:16px var(--rail) 20px;font-family:var(--mono);font-size:14px}
.mobile-nav a{display:block;padding:10px 0;color:var(--dim);text-decoration:none;
  border-bottom:1px solid var(--line)}
.mobile-nav a:last-child{border-bottom:none}
.mobile-nav a:hover,.mobile-nav a[aria-current]{color:var(--ink)}

/* ── Main content ──────────────────────────────────────── */
main{max-width:44rem;margin:0 auto;padding:42px var(--rail) 0}
.crumb{font-family:var(--mono);font-size:.74rem;color:var(--faint);margin-bottom:1.6rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crumb a{color:var(--dim);text-decoration:none}
.crumb a:hover{color:var(--ink)}
.crumb span{margin:0 .35rem;color:var(--faint)}

article h1{font-size:clamp(1.7rem,4vw,2.25rem);font-weight:500;line-height:1.2;margin-bottom:.6rem}
article h2{font-size:1.3rem;font-weight:500;margin-top:2.4rem;padding-bottom:.35rem;border-bottom:1px solid var(--rule)}
article h3{font-size:1.05rem;font-weight:600;margin-top:1.7rem}
article p{margin-top:.8rem}
article p code,article li code,article td code{font-family:var(--mono);font-size:.85em;
  background:var(--gold-wash);padding:.1em .35em;border-radius:4px;
  overflow-wrap:break-word;word-break:break-all}
/* Code blocks: horizontal scroll, never bust layout */
article pre{margin-top:.9rem;background:var(--surface);border:1px solid var(--line);border-radius:10px;
  padding:14px 16px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  font-family:var(--mono);font-size:.82rem;line-height:1.55;max-width:100%}
article pre code{background:none;padding:0;font-size:inherit;white-space:pre;overflow-wrap:normal;word-break:normal}
/* Tables: CSS-only horizontal scroll wrapper via display:block */
article table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;
  margin-top:1rem;border-collapse:collapse;min-width:480px;width:max-content;max-width:100%;
  font-size:.92rem}
article th{font-family:var(--mono);font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;
  color:var(--faint);text-align:left;font-weight:500}
article th,article td{padding:.45rem .9rem .45rem 0;border-bottom:1px solid var(--line);vertical-align:top;
  white-space:nowrap}
article td:last-child,article th:last-child{white-space:normal;min-width:120px}
article ul,article ol{margin:.8rem 0 0 1.25rem}
article li{margin-top:.35rem}
article blockquote{margin-top:1rem;border-left:3px solid var(--gold-bright);background:var(--gold-wash);
  padding:.7rem 1rem;border-radius:0 8px 8px 0}
article a{color:var(--gold);text-underline-offset:3px}
article a:hover{color:var(--ink)}
article hr{border:0;border-top:1px solid var(--rule);margin:2rem 0}
/* Long URLs and inline code in body text */
article p,article li,article td{overflow-wrap:break-word;word-break:break-word}

/* ── Hub ───────────────────────────────────────────────── */
main>article .sub,main .sub{color:var(--dim);max-width:36rem;margin-top:.6rem}
main section{margin-top:2.6rem}
main section h2{font-size:1.2rem;font-weight:500;padding-bottom:.35rem;border-bottom:1px solid var(--rule)}
main section ul{list-style:none;margin:1rem 0 0}
main section li{margin-top:1rem}
main section li a{font-size:1.02rem;color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
main section li a:hover{color:var(--gold);border-color:var(--gold)}
main section li p{margin-top:.25rem;color:var(--dim);font-size:.92rem}

.cta{margin-top:3.2rem;border:1px solid var(--line);background:var(--surface);border-radius:12px;
  padding:1rem 1.2rem;font-size:.95rem;color:var(--dim)}
.cta a{color:var(--gold)}

footer.site{margin-top:4rem;padding:26px var(--rail) 40px;border-top:1px solid var(--line);
  display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;
  font-family:var(--mono);font-size:12px;color:var(--faint)}
footer.site a{color:inherit;text-decoration:none}
footer.site a:hover{color:var(--gold)}

/* ── Mobile ≤768px ──────────────────────────────────────── */
@media(max-width:768px){
  :root{--rail:18px}

  /* Header: keep wordmark left, hamburger right; hide inline nav */
  header.site{padding:16px var(--rail) 0;flex-wrap:wrap;gap:0}
  header.site nav.site-nav{display:none}
  .nav-toggle{display:inline-flex}

  /* Mobile nav panel open state */
  .mobile-nav.open{display:block}

  /* Push main down a touch for breathing room */
  main{padding-top:28px}

  /* Breadcrumb: single line, ellipsize */
  .crumb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.72rem}

  /* Contain all overflow within the article — prevents table/pre from blowing out the page.
     overflow-x:clip clips without creating a scroll container (unlike overflow-x:hidden). */
  article{overflow-x:clip}

  /* Headings: slightly tighter at small viewport */
  article h1{font-size:clamp(1.45rem,6vw,1.9rem);line-height:1.22}
  article h2{font-size:1.15rem;margin-top:2rem}
  article h3{font-size:1rem}

  /* Tables: horizontal scroll affordance shadow */
  article table{
    /* Shadow on right edge signals scrollability */
    background:
      linear-gradient(to right,var(--bg) 0%,transparent 30px) left center / 30px 100% no-repeat,
      linear-gradient(to left,var(--bg) 0%,transparent 30px) right center / 30px 100% no-repeat,
      radial-gradient(farthest-side at 0 50%,rgba(24,20,8,.12),transparent) left center / 8px 100% no-repeat,
      radial-gradient(farthest-side at 100% 50%,rgba(24,20,8,.12),transparent) right center / 8px 100% no-repeat;
    background-attachment:local,local,scroll,scroll;
  }

  /* Code blocks already handle overflow-x:auto; ensure font is readable */
  article pre{font-size:.78rem;padding:12px 14px;border-radius:8px}

  /* Footer: stack on very small screens */
  footer.site{flex-direction:column;gap:10px;padding:24px var(--rail) 32px}
}

/* ── Very small (390px iPhone) ──────────────────────────── */
@media(max-width:430px){
  article h1{font-size:clamp(1.35rem,7vw,1.7rem)}
}
