:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e8eef4;
  --muted: #9aa8b8;
  --accent: #6ea8fe;
  --accent-soft: rgba(110, 168, 254, 0.12);
  --warn-bg: #3d3019;
  --warn-border: #8a7030;
  --warn-text: #f0e0b8;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: none;
}

.page-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
}

.site-header h1 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.site-header .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.banner-doc {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.banner-doc strong {
  color: #fff;
}

article h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.02em;
}

article h2:first-of-type {
  margin-top: 0;
}

article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

article p {
  margin: 0.75rem 0;
}

article ul {
  margin: 0.75rem 0;
  padding-left: 1.35rem;
}

article li {
  margin: 0.35rem 0;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.lede {
  font-size: 1.05rem;
}

.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

.note p {
  margin: 0.4rem 0;
}

pre,
.code-block {
  font-family: var(--mono);
  font-size: 0.84rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.45;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

th {
  background: var(--surface);
  font-weight: 600;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.doc-gate {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  margin: 1.5rem 0;
}

.doc-gate h2 {
  margin-top: 0;
}

.auth-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0 0;
}

.auth-form label {
  display: block;
  width: 100%;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: -0.35rem;
}

.auth-form input[type="text"] {
  flex: 1 1 12rem;
  min-width: 10rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.auth-form button {
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-form button:hover {
  background: rgba(110, 168, 254, 0.22);
}

.auth-cli {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1rem;
}

.auth-cli code {
  display: inline-block;
  margin-top: 0.35rem;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Visually hidden but still in DOM — demo only; real agents must sanitize HTML. */
.ipi-demo-payload {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
