@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #fafafa;
  --surface: #f0f0f0;
  --surface-2: #e6e6e6;
  --ink: #000;
  --muted: #666;
  --quiet: #999;
  --line: #d6d6d6;
  --brand: #ff8800;
  --sans: "IBM Plex Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 400 15px/1.68 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.layout { display: grid; grid-template-columns: 280px minmax(0,1fr); min-height: 100vh; }

.sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 25px 20px; background: var(--bg); border-right: 1px solid var(--line); }
.sidebar::before { content: ""; display: block; width: 42px; height: 42px; margin-bottom: 10px; background: transparent url("logo.png") center/contain no-repeat; }
.brand { display: inline-block; font: 700 15px var(--mono); letter-spacing: -.03em; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.tagline { margin: 5px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.back-home { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--muted); font: 500 9px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.back-home:hover { color: #000; }
.search { position: relative; margin-bottom: 24px; }
.search::before { content: "/"; position: absolute; top: 50%; right: 9px; transform: translateY(-50%); padding: 1px 5px; color: var(--muted); border: 1px solid var(--line); font: 9px var(--mono); }
.search input { width: 100%; padding: 10px 34px 10px 10px; color: #000; background: #fff; border: 1px solid var(--line); border-radius: 0; outline: none; font: 12px var(--sans); }
.search input:focus { border-color: #000; }
.nav-section { margin: 23px 9px 8px; color: var(--quiet); font: 600 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.nav a { position: relative; display: block; padding: 8px 9px; border: 1px solid transparent; font-size: 12px; font-weight: 500; }
.nav a:hover { background: var(--surface); text-decoration: none; }
.nav a[aria-current="page"] { padding-left: 14px; color: #fff; background: #000; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; top: 50%; left: 0; width: 5px; height: 5px; background: var(--brand); transform: translateY(-50%); }
.docs-meta { margin-top: 34px; padding-top: 15px; color: var(--quiet); border-top: 1px solid var(--line); font: 8px/1.6 var(--mono); letter-spacing: .07em; text-transform: uppercase; }

.content { width: min(1020px,100%); padding: 62px clamp(32px,6vw,84px) 100px; }
.content::before { content: "ASKTERMINAL / DOCUMENTATION"; display: block; margin-bottom: 42px; color: var(--quiet); font: 600 9px var(--mono); letter-spacing: .1em; }
.hero { margin-bottom: 34px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 13px; color: var(--brand); font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.kicker::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; background: var(--brand); border-radius: 50%; }
h1, h2, h3 { font-family: var(--mono); font-weight: 600; line-height: 1.12; letter-spacing: -.04em; }
h1 { max-width: 850px; margin: 0 0 16px; font-size: clamp(40px,5.5vw,62px); text-transform: uppercase; }
h2 { margin: 52px 0 18px; padding-top: 27px; border-top: 1px solid var(--line); font-size: clamp(25px,3vw,33px); text-transform: uppercase; }
h2::before { content: "//"; margin-right: 10px; color: var(--brand); font-size: .55em; vertical-align: .22em; }
h3 { margin: 30px 0 9px; font-size: 18px; text-transform: uppercase; }
p { margin: 0 0 16px; }
.lead { max-width: 820px; color: var(--muted); font-size: clamp(17px,2vw,19px); line-height: 1.58; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); margin: 25px 0 35px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card { min-height: 215px; padding: 23px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card::before { content: "⌁"; display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 34px; color: #000; background: var(--brand); font: 16px var(--mono); }
.card h3 { margin: 0 0 9px; }
.card p { color: var(--muted); font-size: 13px; }
.card p:last-child, li:last-child { margin-bottom: 0; }
.callout { margin: 24px 0; padding: 18px 20px; background: #fff5e8; border-left: 4px solid var(--brand); }
.callout strong { color: #000; }
ul, ol { padding-left: 23px; }
li { margin: 7px 0; }
code { padding: .12em .34em; color: #000; background: var(--surface); border: 1px solid var(--line); border-radius: 0; font: .88em var(--mono); }
pre { overflow: auto; margin: 22px 0; padding: 19px; color: #ddd; background: #000; border-left: 4px solid var(--brand); font-size: 13px; }
pre code { padding: 0; color: inherit; background: transparent; border: 0; }
table { width: 100%; margin: 22px 0 31px; border-collapse: collapse; border: 1px solid var(--line); background: #fff; }
th, td { padding: 11px 12px; text-align: left; vertical-align: top; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { color: #fff; background: #000; font: 600 9px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
td { font-size: 13px; }
.badge { display: inline-block; margin-right: 6px; padding: 2px 8px; color: #000; background: var(--brand); font: 600 10px var(--mono); }
.next-prev { display: flex; justify-content: space-between; gap: 16px; margin-top: 55px; padding-top: 22px; border-top: 1px solid var(--line); }
.next-prev a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; color: #fff; background: #000; font: 600 10px var(--mono); text-transform: uppercase; }
.next-prev a:hover { background: #222; text-decoration: none; }

.mobile-bar { display: none; }
@media (max-width: 860px) {
  .layout { display: block; }
  .mobile-bar { position: sticky; z-index: 20; top: 0; height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; background: rgba(250,250,250,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font: 700 13px var(--mono); text-transform: uppercase; }
  .mobile-brand img { display: block; width: 40px; height: 40px; object-fit: contain; }
  .docs-toggle { padding: 8px 10px; color: #fff; background: #000; border: 0; font: 600 9px var(--mono); text-transform: uppercase; cursor: pointer; }
  .sidebar { position: fixed; z-index: 19; top: 62px; right: 0; bottom: 0; left: 0; width: auto; height: auto; display: none; padding: 24px 19px 48px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar.open { display: block; }
  .sidebar::before, .sidebar > .brand, .sidebar > .tagline { display: none; }
  .content { padding: 44px 19px 76px; }
  .content::before { margin-bottom: 28px; }
  .hero { padding-bottom: 25px; }
  h1 { font-size: clamp(36px,11vw,52px); }
  h2 { margin-top: 43px; font-size: 26px; }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: auto; }
  table { display: block; overflow-x: auto; }
  th, td { min-width: 145px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
