/* ninja-one-mcp site. Plain CSS, no build step. */

:root {
  --bg: #EDF0EC;
  --surface: #F7F8F5;
  --raised: #FFFFFF;
  --ink: #15201C;
  --muted: #55615C;
  --line: #D2D9D4;
  --line-strong: #AEB8B2;
  --read: #2E5B87;
  --write: #8F6208;
  --destructive: #B42318;
  --focus: #2E5B87;

  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: 24px;
  --radius: 10px;
  --radius-sm: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1412;
    --surface: #151D1A;
    --raised: #1A2420;
    --ink: #E4EAE6;
    --muted: #9AA6A0;
    --line: #26322D;
    --line-strong: #3D4A44;
    --read: #86AEDA;
    --write: #DDA846;
    --destructive: #F2806F;
    --focus: #86AEDA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1412;
  --surface: #151D1A;
  --raised: #1A2420;
  --ink: #E4EAE6;
  --muted: #9AA6A0;
  --line: #26322D;
  --line-strong: #3D4A44;
  --read: #86AEDA;
  --write: #DDA846;
  --destructive: #F2806F;
  --focus: #86AEDA;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "ss01", "tnum" 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
code, pre { font-family: var(--mono); }
p code, li code, dd code, td code, .a code {
  font-size: 0.86em;
  padding: 0.08em 0.32em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  overflow-wrap: anywhere;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 10; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.mark { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.25; }
.mark .on { fill: currentColor; stroke: none; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 0.9375rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.theme {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.theme svg path { fill: currentColor; stroke: none; }
.theme:hover { border-color: var(--line-strong); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 0.9375rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }

/* Hero */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); }
.hero-title {
  font-size: clamp(2.5rem, 7.2vw, 5.25rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}
.hero-title span { display: block; }
.hero-title .quiet { color: var(--muted); }
.lede { margin-top: 28px; max-width: 58ch; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* The gate panel */
.gates {
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.gates-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; margin-bottom: 24px; }
.gates-cap { color: var(--muted); font-size: 0.9375rem; max-width: 36ch; }
.switches { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; min-height: 32px; }
.switch input { position: absolute; opacity: 0; width: 38px; height: 22px; margin: 0; cursor: pointer; }
.switch .track {
  flex: none; width: 38px; height: 22px; border-radius: 999px;
  background: var(--line-strong); position: relative; transition: background 0.2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--raised); box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: transform 0.2s;
}
.switch input:checked + .track { background: var(--ink); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 3px; }
.switch code { font-size: 0.8125rem; color: var(--ink); overflow-wrap: anywhere; }
.switch input:disabled ~ * { opacity: 0.45; }
.switch:has(input:disabled) { cursor: not-allowed; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12px, 1fr));
  gap: 4px;
}
.cell {
  aspect-ratio: 1;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: transparent;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
  transition-delay: var(--d, 0ms);
}
.cell.on { box-shadow: none; }
.cell.read.on { background: var(--read); }
.cell.write.on { background: var(--write); }
.cell.destructive.on { background: var(--destructive); }
.cell.write:not(.on) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--write) 45%, var(--line)); }
.cell.destructive:not(.on) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--destructive) 45%, var(--line)); }

.gates-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-top: 20px; }
.gates-live { font-size: 0.9375rem; }
.gates-live strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.875rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend span { font-variant-numeric: tabular-nums; color: var(--ink); }
.legend i, .dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.k-read { background: var(--read); }
.k-write { background: var(--write); }
.k-destructive { background: var(--destructive); }

/* Sections */
.band { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; max-width: 64ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .muted { font-size: 1.0625rem; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.split > div { display: grid; gap: 14px; }

/* Prompts */
.prompts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.prompts li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.prompts .q { font-size: clamp(1.125rem, 1.8vw, 1.375rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.prompts .a { color: var(--muted); font-size: 0.9375rem; }

/* Ladder */
.ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: clamp(40px, 6vw, 64px); }
.rung { padding: 22px 24px 24px 0; border-top: 3px solid; display: grid; gap: 8px; align-content: start; }
.rung + .rung { padding-left: 24px; border-left: 1px solid var(--line); }
.r-read { border-top-color: var(--read); }
.r-write { border-top-color: var(--write); }
.r-destructive { border-top-color: var(--destructive); }
.rung .setting { font-size: 0.875rem; color: var(--muted); }
.rung .setting code { background: none; padding: 0; color: var(--ink); font-size: 0.8125rem; }
.rung p:last-child { color: var(--muted); font-size: 0.9375rem; }

.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px clamp(32px, 5vw, 72px); }
.rules dt { font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.rules dd { color: var(--muted); font-size: 0.9688rem; max-width: 52ch; }

/* Facts */
.facts { display: grid; gap: 18px; }
.facts li { color: var(--muted); padding-left: 18px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 7px; height: 1px; background: var(--line-strong); }
.facts b { color: var(--ink); font-weight: 600; }

/* Catalog */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.field { position: relative; display: block; }
.field.search { flex: 1 1 280px; }
.field.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.field input, .field select {
  width: 100%; min-height: 44px; font: inherit; font-size: 0.9375rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.field input { padding: 0 14px 0 42px; }
.field input::placeholder { color: var(--muted); opacity: 0.85; }
.field select {
  padding: 0 38px 0 14px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 18px top 50%, right 13px top 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field.select { flex: 0 1 220px; }
.field input:hover, .field select:hover { border-color: var(--line-strong); }
.field input:focus-visible, .field select:focus-visible { outline-offset: 0; border-color: var(--focus); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; margin: 0; background: var(--surface); flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 12px; border-radius: 7px; font-size: 0.875rem; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

.count { font-size: 0.875rem; color: var(--muted); margin: 20px 0 8px; font-variant-numeric: tabular-nums; }
.count b { color: var(--ink); font-weight: 600; }

.catalog { border-top: 1px solid var(--line); }
.tool {
  display: grid;
  grid-template-columns: minmax(0, 20rem) 7.5rem minmax(0, 1fr);
  gap: 6px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.tool-name { font-family: var(--mono); font-size: 0.8438rem; overflow-wrap: anywhere; }
.tool-name small { display: block; font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
.tool-meta { display: grid; gap: 2px; font-size: 0.8125rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 500; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.tool-desc { font-size: 0.9375rem; color: var(--muted); max-width: 72ch; min-width: 0; overflow-wrap: anywhere; }
.tool-desc p { color: var(--ink); }
.tool-desc details { margin-top: 6px; }
.tool-desc summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); width: max-content; list-style: none; }
.tool-desc summary::-webkit-details-marker { display: none; }
.tool-desc summary::before { content: "+"; display: inline-block; width: 1em; font-family: var(--mono); }
.tool-desc details[open] summary::before { content: "\2212"; }
.tool-desc summary:hover { color: var(--ink); }
.tool-desc details p { color: var(--muted); margin-top: 6px; font-size: 0.875rem; }
.tool mark { background: color-mix(in srgb, var(--write) 26%, transparent); color: inherit; border-radius: 2px; }
.empty { padding: 32px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.empty button { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.more-row { margin-top: 24px; }

/* Toolsets */
.toolsets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.toolsets li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.ts-head { display: flex; align-items: baseline; gap: 10px; }
.ts-head code { font-size: 0.9375rem; font-weight: 500; }
.ts-head .n { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ts-head .def { margin-left: auto; font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; }
.toolsets p { font-size: 0.9063rem; color: var(--muted); }
.ts-bar { display: flex; height: 3px; border-radius: 2px; overflow: hidden; margin-top: 8px; background: var(--line); }
.ts-bar span { display: block; height: 100%; }

/* Tabs */
.tablist { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tablist::-webkit-scrollbar { display: none; }
.tablist [role="tab"] {
  flex: none; font: inherit; font-size: 0.9375rem; color: var(--muted); background: none; border: 0;
  padding: 12px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tablist [role="tab"]:hover { color: var(--ink); }
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.tablist [role="tab"]:focus-visible { outline-offset: -2px; }
.panel { padding-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 860px; }
.panel[hidden] { display: none; }
.panel > p { color: var(--muted); max-width: 66ch; }
.panel:focus-visible { outline-offset: 6px; }

.code { min-width: 0; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.code pre { margin: 0; padding: 18px 92px 18px 20px; overflow-x: auto; font-size: 0.8125rem; line-height: 1.65; tab-size: 2; }
.code pre code { white-space: pre; }
.copy {
  position: absolute; top: 10px; right: 10px;
  font: inherit; font-size: 0.8125rem; font-weight: 500; color: var(--ink);
  background: var(--raised); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; min-width: 64px;
}
.copy:hover { border-color: var(--line-strong); }
.copy.done { color: var(--bg); background: var(--ink); border-color: var(--ink); }

/* Config table */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.cfg { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.cfg th, .cfg td { text-align: left; vertical-align: baseline; padding: 14px 20px 14px 0; border-bottom: 1px solid var(--line); }
.cfg thead th { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.cfg tbody th { font-weight: 400; white-space: nowrap; }
.cfg tbody th code { font-size: 0.8125rem; background: none; padding: 0; }
.cfg td { color: var(--muted); }
.cfg td:last-child { white-space: nowrap; padding-right: 0; }

/* Links */
.links { border-top: 1px solid var(--line); }
.links li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.links a { font-weight: 500; }
.links span { color: var(--muted); font-size: 0.9375rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 0.875rem; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot a { color: var(--ink); }
.disclaimer { max-width: 60ch; }

/* 404 */
.lost { min-height: calc(100vh - 60px - 130px); display: grid; align-content: center; padding: 80px 0; }
.lost h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); letter-spacing: -0.04em; line-height: 1; }
.lost p { margin-top: 20px; color: var(--muted); max-width: 48ch; }
.lost .btn { margin-top: 32px; width: max-content; }

/* Responsive */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .tool { grid-template-columns: minmax(0, 1fr) auto; }
  .tool-desc { grid-column: 1 / -1; }
  .tool-meta { justify-items: end; text-align: right; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav { display: none; }
  .brand { margin-right: auto; }
  .ladder { grid-template-columns: 1fr; }
  .rung, .rung + .rung { padding: 18px 0 20px; border-left: 0; }
  .rules { grid-template-columns: 1fr; gap: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(9px, 1fr)); gap: 3px; }
  .cell { border-radius: 2px; }
  .field.select { flex: 1 1 100%; }
  .seg { width: 100%; }
  .seg label { flex: 1; text-align: center; }
  .seg span { padding: 8px 6px; }
  .cfg thead { display: none; }
  .cfg, .cfg tbody, .cfg tr, .cfg th, .cfg td { display: block; }
  .cfg tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .cfg th, .cfg td { border: 0; padding: 2px 0; white-space: normal; }
  .cfg tbody th code { overflow-wrap: anywhere; }
  .cfg td:last-child { font-size: 0.8125rem; white-space: normal; }
  .cfg td:last-child::before { content: "Default: "; }
  .code pre { padding: 52px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0ms !important; animation: none !important; }
}
