/* NyayAssist Docs
   Public chrome (header, footer, brand marks) follows nyayassist.ai.
   Docs body, sidebar, tabs, callouts and controls follow the NyayAssist app (app.nyayassist.ai).
   Token sources are listed in DESIGN-NOTES.md. Light theme only, as on both properties. */

:root {
  /* App: shadcn "gray" base, converted from app/globals.css oklch values */
  --foreground: #030712;
  --heading: #111827;        /* gray-900, app page titles */
  --text: #374151;           /* gray-700, app sidebar and body text */
  --text-2: #4b5563;         /* gray-600 */
  --muted-fg: #6b7280;       /* --muted-foreground */
  --subtle: #9ca3af;         /* --ring, icons at rest */
  --border: #e5e7eb;         /* --border / --input */
  --border-soft: #f3f4f6;
  --muted: #f3f4f6;          /* --muted / --secondary / tabs track */
  --surface: #f9fafb;        /* --sidebar, code blocks */
  --gray-bg: #fafafa;        /* --gray-background */
  --primary: #2f2f2f;        /* --primary, oklch(0.3052 0 0) */
  --nav-active: #eff6ff;     /* sidebar active / hover, bg-blue-50 */
  --link: #2247ff;           /* --profile-link */
  --success: #007722;        /* --profile-success */
  --case-bg-yellow: #fffaec;
  --case-bg-blue: #eff9ff;
  --case-blue: #027ecb;
  --case-bg-maroon: #ffeeee;
  --case-maroon: #970003;
  --radius: 0.625rem;        /* 10px, app --radius */
  --radius-md: 8px;          /* calc(var(--radius) - 2px) */
  --radius-sm: 6px;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);

  /* Landing: header, footer, brand */
  --charcoal: #242424;       /* pricing.charcoal, nav links */
  --navy: #0b0e30;           /* pricing.navy, --text-primary */
  --footer-muted: #9d9fac;
  --brand-blue: #1687f9;     /* landing --primary / --ring, hsl(210 95% 53.1%) */

  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Inria Serif", Georgia, serif;
  --font-site: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.nav-open { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(34 71 255 / 0.35); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; flex: none; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-md);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------ buttons (app Button atom) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-dark { background: var(--primary); color: #fff; box-shadow: var(--shadow-xs); }
.btn-dark:hover { background: rgb(47 47 47 / 0.9); }
.btn-outline { background: #fff; color: var(--heading); border-color: #111111; box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: var(--muted); }
.btn-block { width: 100%; max-width: 320px; height: 48px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 4px; }

/* ------------------------------------------------------------ header (nyayassist.ai navbar, light state) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid #eaeaea;
  font-family: var(--font-site);
}
.header-inner {
  max-width: 1440px; margin: 0 auto; height: var(--header-h);
  padding: 0 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; justify-self: start; }
.brand img { width: 150px; height: auto; display: block; }
.brand-docs {
  margin-left: 14px; padding-left: 14px; border-left: 1px solid #d9d9d9;
  font-size: 15px; font-weight: 500; color: var(--charcoal); line-height: 24px;
}
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a {
  color: var(--charcoal); font-size: 14px; font-weight: 500; text-decoration: none; padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.header-nav a:hover { color: rgb(36 36 36 / 0.8); }
.header-nav a.is-active { border-bottom-color: var(--charcoal); }
.header-actions { display: flex; align-items: center; gap: 16px; justify-self: end; }
.header-login { color: var(--charcoal); font-size: 14px; font-weight: 500; text-decoration: none; }
.header-login:hover { color: rgb(36 36 36 / 0.8); }
.btn-header {
  font-family: var(--font-site); background: #000; color: #fff; height: 39px; padding: 0 16px 2px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-xs);
}
.btn-header:hover { background: rgb(0 0 0 / 0.9); }
.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: -8px;
  background: none; border: 0; border-radius: var(--radius-sm); color: #000; cursor: pointer;
}
.nav-toggle:hover { background: rgb(0 0 0 / 0.05); }

/* ------------------------------------------------------------ layout */
.layout {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 272px minmax(0, 1fr);
}
.layout.has-toc { grid-template-columns: 272px minmax(0, 1fr) 232px; }
main { min-width: 0; }
.content { max-width: 768px; margin: 0 auto; padding: 32px 48px 88px; }

/* ------------------------------------------------------------ sidebar (app Sidebar) */
.sidebar {
  position: sticky; top: var(--header-h); align-self: start;
  height: calc(100vh - var(--header-h)); overflow-y: auto;
  border-right: 1px solid var(--border); background: #fff;
  padding: 16px 8px 32px;
}
.drawer-head, .drawer-foot, .drawer-only { display: none; }
.nav-group + .nav-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.nav-label {
  margin: 4px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted-fg);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px;
  border-radius: var(--radius-md); color: var(--text); font-size: 15px; line-height: 1.3;
  text-decoration: none; transition: background-color .15s;
}
.nav-item .ic { color: var(--muted-fg); }
.nav-item .ext-ic { width: 14px; height: 14px; margin-left: auto; color: var(--subtle); }
.nav-item:hover { background: var(--nav-active); }
.nav-item[aria-current="page"] { background: var(--nav-active); color: var(--heading); font-weight: 600; }
.nav-item[aria-current="page"] .ic { color: var(--heading); }

/* ------------------------------------------------------------ on this page */
.toc { padding: 32px 24px 32px 8px; }
.toc-inner { position: sticky; top: calc(var(--header-h) + 32px); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; }
.toc-title { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-fg); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a {
  display: block; margin-left: -1px; padding: 5px 12px; border-left: 2px solid transparent;
  color: var(--text-2); font-size: 14px; line-height: 1.4; text-decoration: none;
}
.toc a:hover { color: var(--heading); }
.toc a.active { color: var(--heading); font-weight: 600; border-left-color: var(--heading); }

/* ------------------------------------------------------------ page head and type */
.breadcrumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: var(--muted-fg); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumbs a { color: var(--muted-fg); text-decoration: none; }
.breadcrumbs a:hover { color: var(--heading); }
.breadcrumbs [aria-current] { color: var(--heading); }
.crumb-sep { width: 14px; height: 14px; color: var(--subtle); }
.page-head { margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); }
h1, h2 { font-family: var(--font-serif); font-weight: 700; color: var(--heading); letter-spacing: -0.01em; }
h1 { margin: 0; font-size: 40px; line-height: 1.15; }
.lead { margin: 14px 0 0; font-size: 20px; line-height: 1.5; color: var(--text-2); }
h2 { position: relative; margin: 56px 0 14px; font-size: 28px; line-height: 1.25; }
h3 { margin: 32px 0 8px; font-size: 19px; line-height: 1.35; font-weight: 600; color: var(--heading); }
h4 { margin: 24px 0 6px; font-size: 17px; font-weight: 600; color: var(--heading); }
p { margin: 0 0 14px; }
strong { font-weight: 600; color: var(--heading); }
.anchor { margin-left: 8px; color: var(--subtle); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
ul, ol { margin: 0 0 16px; padding-left: 1.3em; }
li { margin: 6px 0; }
li::marker { color: var(--subtle); }
ol > li::marker { color: var(--muted-fg); font-weight: 600; }
code { font-family: var(--font-mono); font-size: 0.86em; background: var(--muted); color: #1f2937; padding: 0.12em 0.4em; border-radius: 4px; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.intro p { font-size: 17px; }
.muted-note { color: var(--muted-fg); font-size: 15px; margin-top: 16px; }
.after-qa { margin-top: 28px; }

/* ------------------------------------------------------------ home panel */
.feature-panel {
  background: var(--gray-bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px 32px; margin: 0 0 8px;
}
.feature-panel h2 { margin: 0 0 12px; font-size: 26px; }
.feature-panel .eyebrow { margin-bottom: 8px; }
.panel-note { color: var(--muted-fg); font-size: 15px; }

/* ------------------------------------------------------------ link rows and term lists */
.link-list { list-style: none; padding: 0; margin: 8px 0 16px; border-top: 1px solid var(--border); }
.link-list li { margin: 0; border-bottom: 1px solid var(--border); }
.link-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center;
  padding: 14px 8px; text-decoration: none; color: inherit; border-radius: var(--radius-sm);
}
.link-list a:hover { background: var(--surface); }
.link-list a:hover .ll-title { text-decoration: underline; text-underline-offset: 3px; }
.ll-title { grid-column: 1; font-weight: 600; color: var(--heading); }
.ll-desc { grid-column: 1; font-size: 15px; color: var(--muted-fg); line-height: 1.5; }
.link-list .ic { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--subtle); }

.feature-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; margin: 8px 0 24px; }
.feature-list > div { padding: 14px 0; border-top: 1px solid var(--border); }
.feature-list dt { font-weight: 600; color: var(--heading); }
.feature-list dd { margin: 2px 0 0; font-size: 15.5px; color: var(--text-2); line-height: 1.55; }

/* ------------------------------------------------------------ quick start steps (app Stepper, vertical) */
.steps { list-style: none; padding: 0; margin: 20px 0 8px; counter-reset: step; }
.steps > li { position: relative; margin: 0; padding: 0 0 28px 48px; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 38px; bottom: 6px; width: 1px; background: var(--border); }
.steps > li > h3 { margin: 2px 0 8px; font-size: 18px; }
.plain-steps { padding-left: 1.4em; }
.plain-steps > li { padding-left: 4px; }

/* ------------------------------------------------------------ prompts */
.prompt {
  margin: 12px 0 16px; padding: 12px 16px; background: var(--muted); border-radius: 12px;
  color: #1f2937; font-size: 16px; line-height: 1.55;
}
.prompt p { margin: 0; }

/* ------------------------------------------------------------ tabs (app Tabs atom) */
.tabs { margin: 16px 0 8px; }
.tablist {
  display: flex; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--muted); border-radius: var(--radius); padding: 3px; gap: 2px;
}
.tablist::-webkit-scrollbar { display: none; }
.tablist [role="tab"] {
  flex: none; height: 32px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--text-2); font-family: inherit; font-size: 15px; font-weight: 600;
  white-space: nowrap; cursor: pointer; transition: color .15s, background-color .15s;
}
.tablist [role="tab"]:hover { color: var(--heading); }
.tablist [role="tab"][aria-selected="true"] { background: #fff; color: var(--heading); box-shadow: var(--shadow-sm); }
.tabs:not(.js-tabs) .tablist { display: none; }
.tabpanel { padding-top: 4px; }
.tabpanel:focus-visible { outline-offset: 6px; }
.tabpanel > h3:first-child { margin-top: 24px; }

/* ------------------------------------------------------------ code and URL fields */
.codeblock { margin: 12px 0 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--border); }
.code-label { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-fg); }
.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.codeblock pre code { background: none; padding: 0; font-size: inherit; color: #1f2937; overflow-wrap: normal; white-space: pre; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-xs);
  color: var(--text); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; flex: none;
}
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn:hover { background: var(--muted); }
.copy-btn.copied { color: var(--success); }
.url-box { display: flex; align-items: center; gap: 8px; margin: 10px 0 14px; }
.url-field {
  flex: 1; min-width: 0; height: 36px; display: block; padding: 0 12px; line-height: 34px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-xs);
  font-size: 14.5px; color: var(--heading); white-space: nowrap; overflow-x: auto; overflow-wrap: normal; scrollbar-width: thin;
}
.url-box .copy-btn { height: 36px; padding: 0 14px; border-radius: var(--radius-md); }
.install-links { margin: 14px 0 16px; }

/* ------------------------------------------------------------ callouts (app Alert) */
.callout {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; align-items: start;
  margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; font-size: 15.5px; line-height: 1.55;
}
.callout > .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--muted-fg); }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.callout-title { font-weight: 600; color: var(--heading); margin-bottom: 2px !important; }
.callout.warn { background: var(--case-bg-yellow); border-color: #f1dc9c; }
.callout.warn > .ic { color: #8a6100; }

/* ------------------------------------------------------------ disclosures and Q&A (app Accordion) */
.disclosure { margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.disclosure > summary, .qa > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer;
  font-weight: 600; color: var(--heading);
}
.disclosure > summary::-webkit-details-marker, .qa > summary::-webkit-details-marker { display: none; }
.disclosure > summary { padding: 12px 16px; font-size: 16px; }
.disclosure > summary:hover { background: var(--surface); border-radius: var(--radius); }
.disclosure > summary .ic, .qa > summary .ic { width: 16px; height: 16px; color: var(--muted-fg); transition: transform .2s; }
.disclosure[open] > summary .ic, .qa[open] > summary .ic { transform: rotate(180deg); }
.disclosure-body { padding: 4px 16px 14px; font-size: 16px; }
.disclosure-body > :last-child { margin-bottom: 0; }
.qa { border-bottom: 1px solid var(--border); }
:not(.qa) + .qa { border-top: 1px solid var(--border); }
.qa > summary { padding: 16px 0; font-size: 17px; line-height: 1.4; }
.qa > summary:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--subtle); }
.qa-body { padding: 0 32px 14px 0; }
.qa-body > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ tables */
.table-wrap { margin: 8px 0 12px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th { background: var(--surface); font-weight: 600; color: var(--heading); }
tbody th { font-weight: 600; color: var(--heading); white-space: nowrap; width: 1%; }

/* ------------------------------------------------------------ badges (app Badge) */
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; color: var(--text);
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.badge.create { background: var(--case-bg-yellow); border-color: #f1dc9c; color: #7a5500; }
.badge.state { background: var(--case-bg-blue); border-color: #c3e2f5; color: #02588f; }
.badge.outside { background: var(--case-bg-maroon); border-color: #f4c7c7; color: var(--case-maroon); }

/* ------------------------------------------------------------ tools reference */
.legend { display: grid; gap: 10px; margin: 8px 0 20px; }
.legend > div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 15.5px; }
.legend .badge { justify-self: start; }
.tool-index { list-style: none; padding: 0; margin: 8px 0 8px; border-top: 1px solid var(--border); }
.tool-index li { margin: 0; border-bottom: 1px solid var(--border); }
.tool-index a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 12px 8px;
  color: inherit; text-decoration: none; border-radius: var(--radius-sm);
}
.tool-index a:hover { background: var(--surface); }
.tool-index a:hover .ti-name { text-decoration: underline; text-underline-offset: 3px; }
.ti-name { font-weight: 600; color: var(--heading); }
.ti-desc { grid-column: 1; font-size: 15px; color: var(--muted-fg); line-height: 1.45; }
.ti-count { grid-column: 2; grid-row: 1; font-size: 14px; color: var(--muted-fg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
h2 + .tool, h2 + p + .tool { border-top: 0; padding-top: 0; }
.tool h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; }
.tool h3 code { background: none; padding: 0; font-size: 17px; font-weight: 600; color: var(--heading); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tool p, .tool li { font-size: 16px; }

/* ------------------------------------------------------------ reviewer test steps */
.test-step { margin: 14px 0; padding: 18px 22px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.ts-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.test-step h3 { margin: 0; font-size: 18px; }
.ts-num { color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.test-step dl { margin: 12px 0 0; }
.test-step dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); font-size: 16px; }
.test-step dt { padding-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-fg); }
.test-step dd { margin: 0; }

/* ------------------------------------------------------------ previous / next */
.page-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border); }
.page-nav a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; transition: border-color .15s, background-color .15s;
}
.page-nav a:hover { border-color: var(--subtle); background: var(--surface); }
.page-nav .next { text-align: right; align-items: flex-end; grid-column: 2; }
.pn-label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted-fg); }
.pn-label .ic { width: 14px; height: 14px; }
.pn-title { font-weight: 600; color: var(--heading); }

/* ------------------------------------------------------------ 404 */
.notfound { text-align: center; padding: 24px 0 8px; }
.notfound-code { font-family: var(--font-serif); font-weight: 700; font-size: 96px; line-height: 1; color: var(--border); margin: 0 0 12px; }
.notfound .btn-row { justify-content: center; }

/* ------------------------------------------------------------ footer (nyayassist.ai Footer) */
.site-footer { background: #000; color: #fff; font-family: var(--font-site); }
.footer-mark { padding: 24px 0; }
.footer-mark img { display: block; width: 100%; height: auto; }
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 48px 32px 0;
  display: flex; justify-content: space-between; gap: 48px;
}
.footer-brand img { width: 150px; height: auto; display: block; }
.footer-brand address { margin-top: 16px; font-style: normal; font-size: 14px; line-height: 1.6; color: var(--footer-muted); }
.site-footer a { color: inherit; text-decoration: none; }
.footer-brand address a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); gap: 0 64px; }
.footer-heading { margin: 0 0 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase; color: var(--footer-muted); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-cols li { margin: 0; font-size: 14px; line-height: 1.4; }
.footer-cols a { color: #fff; }
.footer-cols a:hover { opacity: 0.8; }
.footer-bottom { max-width: 760px; margin: 0 auto; padding: 40px 32px 32px; text-align: center; font-size: 14px; line-height: 1.6; color: var(--footer-muted); }
.footer-bottom p { margin: 4px 0; }
.site-footer :focus-visible { outline-color: #fff; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1279px) {
  .layout.has-toc { grid-template-columns: 256px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1099px) {
  .header-inner { grid-template-columns: auto 1fr; }
  .header-nav { display: none; }
}
@media (max-width: 899px) {
  :root { --header-h: 64px; }
  .header-inner { padding: 0 16px; }
  .brand img { width: 132px; }
  .brand-docs { margin-left: 10px; padding-left: 10px; }
  .header-login { display: none; }
  .header-actions { gap: 8px; }
  .nav-toggle { display: inline-flex; }
  .layout, .layout.has-toc { display: block; }
  .content { padding: 24px 16px 64px; max-width: 720px; }

  /* Full-screen menu, as on nyayassist.ai */
  .sidebar {
    display: none; position: fixed; inset: 0; z-index: 100; height: 100dvh; width: 100%;
    padding: 0; border: 0; overflow: hidden; flex-direction: column;
  }
  .sidebar.open { display: flex; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px; flex: none; border-bottom: 1px solid var(--border-soft); }
  .drawer-logo img { width: 132px; display: block; }
  .nav-close {
    padding: 8px 12px; border: 0; background: none; border-radius: var(--radius-sm);
    font-family: var(--font-site); font-size: 16px; font-weight: 500; color: var(--navy); cursor: pointer;
  }
  .nav-close:hover { background: rgb(11 14 48 / 0.05); }
  .sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 8px 24px; }
  .drawer-only { display: block; }
  .nav-item.plain { padding-left: 12px; }
  .drawer-foot { display: flex; justify-content: center; flex: none; padding: 20px 24px; border-top: 1px solid var(--border-soft); }
  .drawer-foot .btn-outline { font-family: var(--font-site); border-color: var(--charcoal); color: var(--charcoal); }

  h1 { font-size: 32px; }
  .lead { font-size: 18px; }
  h2 { font-size: 24px; margin-top: 44px; }
  .feature-panel { padding: 22px 20px; }
  .feature-panel h2 { font-size: 22px; }
  .footer-inner { flex-direction: column; padding: 40px 16px 0; gap: 40px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .footer-bottom { padding: 32px 16px 28px; }
}
@media (max-width: 767px) {
  .btn-header { background: none; color: var(--charcoal); box-shadow: none; padding: 0 10px; font-size: 15px; }
  .btn-header:hover { background: rgb(0 0 0 / 0.05); }
}
@media (max-width: 639px) {
  body { font-size: 16.5px; }
  .feature-list { grid-template-columns: 1fr; }
  .legend > div { grid-template-columns: 1fr; gap: 4px; }
  .test-step { padding: 16px; }
  .test-step dl > div { grid-template-columns: 1fr; gap: 2px; }
  .page-nav { grid-template-columns: 1fr; }
  .page-nav .next { grid-column: 1; }
  .page-nav > span { display: none; }
  .url-box { flex-wrap: wrap; }
  .url-box .url-field { flex-basis: 100%; }
  .qa-body { padding-right: 0; }
}
@media (max-width: 380px) {
  .brand-docs { display: none; }
}

@media print {
  .site-header, .sidebar, .toc, .page-nav, .site-footer, .copy-btn { display: none !important; }
  .layout { display: block; }
  .tabs .tablist { display: none; }
  .tabpanel[hidden] { display: block !important; }
}
