/* NovaOS MCP portal. Built only on the agentic design system tokens (tokens.css, Design Tokens 1.5.0,
   Nova Boilerplate 3.1): warm monochrome ground, ink for every control, persona colour only as a
   background field. Alexandria for words, Doto for large figures, Orbitron for the wordmark. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--o-background);
  color: var(--o-foreground);
  font-family: var(--o-font-sans);
  font-size: var(--o-font-size-md);
  font-weight: var(--o-font-weight-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--o-border-strong); }
a:hover { text-decoration-color: var(--o-foreground); }
:focus-visible { outline: none; box-shadow: var(--o-focus-ring); border-radius: var(--o-radius-xs); }
code, pre, kbd { font-family: var(--o-font-mono); }
:not(pre) > code { font-size: 0.92em; background: var(--o-fill-selected); padding: 1px 6px; border-radius: var(--o-radius-xs); }
strong { font-weight: var(--o-font-weight-medium); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--o-space-4); }

/* ---------- bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--o-background) 84%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--o-border); }
.bar .wrap { display: flex; align-items: center; gap: var(--o-space-4); height: 60px; }
.brand { display: flex; align-items: center; gap: var(--o-space-3); text-decoration: none; }
.brand svg { height: 17px; width: auto; color: var(--o-foreground); }
.brand .product { font-size: var(--o-font-size-md); font-weight: var(--o-font-weight-regular); color: var(--o-muted-foreground); padding-left: var(--o-space-3); border-left: 1px solid var(--o-border); }
.nav { margin-left: auto; display: flex; align-items: center; gap: var(--o-space-1); }
.nav a { text-decoration: none; font-size: var(--o-font-size-sm); font-weight: var(--o-font-weight-regular); color: var(--o-muted-foreground); padding: 6px 12px; border-radius: var(--o-radius-pill); transition: background var(--o-duration-fast) var(--o-ease-out), color var(--o-duration-fast) var(--o-ease-out); }
.nav a:hover { background: var(--o-fill-hover); color: var(--o-foreground); }
.nav a[aria-current="page"] { background: var(--o-chip-selected-bg); color: var(--o-chip-selected-fg); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--o-space-2); height: var(--o-button-height); padding: 0 var(--o-button-padding-x); border-radius: var(--o-button-radius); border: 1px solid transparent; font: var(--o-button-font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform var(--o-duration-press) var(--o-ease-out), background var(--o-duration-fast) var(--o-ease-out); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--o-button-primary-bg); color: var(--o-button-primary-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--o-button-primary-bg) 88%, var(--o-background)); }
.btn-ghost { background: var(--o-button-ghost-bg); color: var(--o-button-ghost-fg); }
.btn-ghost:hover { background: var(--o-fill-selected); }
.chip { display: inline-flex; align-items: center; gap: var(--o-space-2); height: var(--o-chip-height); padding: 0 14px; border-radius: var(--o-chip-radius); border: 1px solid var(--o-chip-border); background: var(--o-chip-bg); color: var(--o-foreground); font-family: var(--o-font-sans); font-size: var(--o-font-size-sm); font-weight: var(--o-font-weight-regular); text-decoration: none; cursor: pointer; transition: border-color var(--o-duration-fast) var(--o-ease-out), background var(--o-duration-fast) var(--o-ease-out); }
.chip:hover { border-color: var(--o-border-strong); }
.chip.on { background: var(--o-chip-selected-bg); color: var(--o-chip-selected-fg); border-color: var(--o-chip-selected-bg); }
.theme-toggle { height: 30px; padding: 0 12px; font-size: var(--o-font-size-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: var(--o-font-weight-medium); }
.eyebrow { font-size: var(--o-font-size-xs); font-weight: var(--o-font-weight-medium); text-transform: uppercase; letter-spacing: .18em; color: var(--o-muted-foreground); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--o-success-dot); display: inline-block; }
.dot.off { background: var(--o-border-strong); }

/* ---------- hero with persona field ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% -10% -10%; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 18%, var(--o-persona-30), transparent 70%),
    radial-gradient(55% 60% at 12% 85%, color-mix(in srgb, var(--o-persona-alt) 55%, transparent), transparent 72%),
    radial-gradient(40% 40% at 50% 50%, var(--o-persona-10), transparent 70%);
  filter: blur(8px);
}
/* Dark: the light alt glow would sit under body text, so the field uses the deep tone instead. */
:root[data-theme="dark"] .hero::before {
  background:
    radial-gradient(60% 55% at 78% 18%, var(--o-persona-30), transparent 70%),
    radial-gradient(55% 60% at 12% 85%, color-mix(in srgb, var(--o-persona-deep) 80%, transparent), transparent 72%),
    radial-gradient(40% 40% at 50% 50%, var(--o-persona-10), transparent 70%);
}
.hero .wrap { position: relative; }
.display { font-size: clamp(36px, 6vw, var(--o-font-size-display)); line-height: 1.06; letter-spacing: -0.02em; margin: var(--o-space-4) 0 var(--o-space-5); font-weight: var(--o-font-weight-display); max-width: 18ch; }
.display b { display: block; font-weight: var(--o-font-weight-medium); }
.lede { font-size: 17px; color: var(--o-muted-foreground); max-width: 60ch; margin: 0 0 var(--o-space-8); }
.composer { max-width: 720px; background: var(--o-card); border: 1px solid var(--o-border); border-radius: var(--o-radius-xl); box-shadow: var(--o-shadow-md); padding: var(--o-space-4); }
.composer .row { display: flex; align-items: center; gap: var(--o-space-3); }
.composer .label { font-size: var(--o-font-size-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--o-muted-foreground); font-weight: var(--o-font-weight-medium); }
.composer .url { flex: 1; min-width: 0; font-family: var(--o-font-mono); font-size: 15px; overflow-x: auto; white-space: nowrap; padding: 8px 0; }
.composer .chips { display: flex; flex-wrap: wrap; gap: var(--o-space-2); margin-top: var(--o-space-3); padding-top: var(--o-space-3); border-top: 1px solid var(--o-border); }
.note { font-size: var(--o-font-size-sm); color: var(--o-muted-foreground); margin-top: var(--o-space-4); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--o-border); border-left: 1px solid var(--o-border); margin: var(--o-space-12) 0 0; }
.stat { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--o-space-3); padding: var(--o-space-4); border-right: 1px solid var(--o-border); border-bottom: 1px solid var(--o-border); min-height: 92px; }
.stat .k { font-size: var(--o-font-size-sm); color: var(--o-muted-foreground); }
.stat .v { font-family: var(--o-font-num); font-variation-settings: "ROND" 100; font-weight: 800; font-size: 40px; line-height: 1; }

/* ---------- sections ---------- */
section { padding: var(--o-space-12) 0; border-top: 1px solid var(--o-border); }
.sec-h { display: flex; align-items: baseline; gap: var(--o-space-3); margin-bottom: var(--o-space-2); }
.sec-n { font-family: var(--o-font-mono); font-size: var(--o-font-size-sm); color: var(--o-muted-foreground); }
h2 { font-size: 30px; font-weight: var(--o-font-weight-light); letter-spacing: -0.01em; margin: 0; }
h3 { font-size: var(--o-font-size-lg); font-weight: var(--o-font-weight-medium); margin: 0 0 var(--o-space-1); }
.sub { color: var(--o-muted-foreground); max-width: 68ch; margin: 0 0 var(--o-space-6); }
.grid { display: grid; gap: var(--o-space-3); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--o-card-bg); border: 1px solid var(--o-card-border); border-radius: var(--o-card-radius); padding: var(--o-space-5); transition: border-color var(--o-duration-fast) var(--o-ease-out); }
a.card { display: block; text-decoration: none; }
.card:hover { border-color: var(--o-card-hover-border); }
.card p { margin: var(--o-space-1) 0 0; color: var(--o-muted-foreground); font-size: var(--o-font-size-sm); }
.card .meta { margin-top: var(--o-space-3); font-family: var(--o-font-mono); font-size: var(--o-font-size-xs); color: var(--o-muted-foreground); word-break: break-all; }
.card.feature { padding: var(--o-space-6); }
.card .tag { display: inline-block; font-size: var(--o-font-size-xs); text-transform: uppercase; letter-spacing: .12em; font-weight: var(--o-font-weight-medium); color: var(--o-muted-foreground); margin-bottom: var(--o-space-2); }

/* ---------- tabs (radio, works without JS) ---------- */
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabbar { display: flex; flex-wrap: wrap; gap: var(--o-space-2); margin-bottom: var(--o-space-4); }
.panel { display: none; background: var(--o-panel-bg); border: 1px solid var(--o-border); border-radius: var(--o-panel-radius); padding: var(--o-panel-padding); }
.panel ol { margin: 0; padding-left: 20px; }
.panel li { margin: 0 0 var(--o-space-5); }
.panel li:last-child { margin-bottom: 0; }
.panel .note { margin: var(--o-space-4) 0 0; }
.panel .badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--o-font-size-xs); text-transform: uppercase; letter-spacing: .12em; font-weight: var(--o-font-weight-medium); color: var(--o-muted-foreground); margin-bottom: var(--o-space-4); }
.tabs > input:nth-of-type(1):checked ~ .tabbar label:nth-of-type(1), .tabs > input:nth-of-type(2):checked ~ .tabbar label:nth-of-type(2),
.tabs > input:nth-of-type(3):checked ~ .tabbar label:nth-of-type(3), .tabs > input:nth-of-type(4):checked ~ .tabbar label:nth-of-type(4),
.tabs > input:nth-of-type(5):checked ~ .tabbar label:nth-of-type(5), .tabs > input:nth-of-type(6):checked ~ .tabbar label:nth-of-type(6),
.tabs > input:nth-of-type(7):checked ~ .tabbar label:nth-of-type(7), .tabs > input:nth-of-type(8):checked ~ .tabbar label:nth-of-type(8) { background: var(--o-chip-selected-bg); color: var(--o-chip-selected-fg); border-color: var(--o-chip-selected-bg); }
.tabs > input:nth-of-type(1):checked ~ .panels .panel:nth-of-type(1), .tabs > input:nth-of-type(2):checked ~ .panels .panel:nth-of-type(2),
.tabs > input:nth-of-type(3):checked ~ .panels .panel:nth-of-type(3), .tabs > input:nth-of-type(4):checked ~ .panels .panel:nth-of-type(4),
.tabs > input:nth-of-type(5):checked ~ .panels .panel:nth-of-type(5), .tabs > input:nth-of-type(6):checked ~ .panels .panel:nth-of-type(6),
.tabs > input:nth-of-type(7):checked ~ .panels .panel:nth-of-type(7), .tabs > input:nth-of-type(8):checked ~ .panels .panel:nth-of-type(8) { display: block; }
.tabs > input:focus-visible ~ .tabbar { box-shadow: var(--o-focus-ring); border-radius: var(--o-radius-md); }

/* ---------- code ---------- */
.code { position: relative; margin: var(--o-space-2) 0 0; }
.code pre { margin: 0; background: var(--o-muted); border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); padding: 14px 16px; padding-right: 88px; overflow-x: auto; font-size: 13px; line-height: 1.6; color: var(--o-foreground); }
.copy { position: absolute; top: 9px; right: 9px; height: 26px; padding: 0 12px; border-radius: var(--o-radius-pill); border: 1px solid var(--o-border-strong); background: var(--o-background); color: var(--o-foreground); font-family: var(--o-font-sans); font-size: 10.5px; font-weight: var(--o-font-weight-medium); text-transform: uppercase; letter-spacing: .12em; cursor: pointer; }
.copy:hover { border-color: var(--o-foreground); }
.copy.done { background: var(--o-foreground); color: var(--o-background); border-color: var(--o-foreground); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--o-border); border-radius: var(--o-radius-md); }
table { width: 100%; border-collapse: collapse; font-size: var(--o-font-size-sm); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--o-border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: var(--o-font-size-xs); text-transform: uppercase; letter-spacing: .12em; font-weight: var(--o-font-weight-medium); color: var(--o-muted-foreground); background: var(--o-muted); }
td code { white-space: nowrap; }
.tier { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--o-radius-pill); border: 1px solid var(--o-border); font-size: var(--o-font-size-xs); color: var(--o-muted-foreground); white-space: nowrap; }
.tier.mut { border-color: var(--o-warning-30); color: var(--o-warning-text); }

/* ---------- docs layout (guides, skills, tools) ---------- */
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--o-space-12); padding-top: var(--o-space-8); padding-bottom: var(--o-space-12); }
.side { position: sticky; top: 84px; align-self: start; background: var(--o-sidebar); border: 1px solid var(--o-sidebar-border); border-radius: var(--o-radius-xl); padding: var(--o-space-3); max-height: calc(100vh - 110px); overflow: auto; }
.side .eyebrow { display: block; padding: var(--o-space-2) var(--o-space-2) var(--o-space-1); }
.side a { display: block; padding: 7px 10px; border-radius: var(--o-radius-sm); text-decoration: none; font-size: var(--o-font-size-sm); font-weight: var(--o-font-weight-regular); color: var(--o-muted-foreground); }
.side a:hover { background: var(--o-fill-hover); color: var(--o-foreground); }
.side a.on { background: var(--o-fill-selected); color: var(--o-foreground); }
.prose { min-width: 0; max-width: 820px; }
.prose h1 { font-size: 40px; font-weight: var(--o-font-weight-display); letter-spacing: -0.02em; line-height: 1.1; margin: var(--o-space-3) 0 var(--o-space-4); }
.prose h2 { font-size: 24px; margin-top: var(--o-space-12); padding-top: var(--o-space-6); border-top: 1px solid var(--o-border); }
.prose h3 { margin-top: var(--o-space-8); }
.prose blockquote { margin: 0 0 var(--o-space-6); padding: 0; border: 0; font-size: 18px; color: var(--o-muted-foreground); }
.prose pre { background: var(--o-muted); border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); padding: 14px 16px; overflow-x: auto; font-size: 13px; }
.prose table { display: block; overflow-x: auto; border: 1px solid var(--o-border); border-radius: var(--o-radius-md); }
.prose li { margin: 4px 0; }
.page-head { padding: var(--o-space-8) 0 var(--o-space-6); }
.page-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: var(--o-font-weight-display); letter-spacing: -0.02em; margin: var(--o-space-3) 0 var(--o-space-3); }
.page-body { padding-bottom: var(--o-space-12); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--o-border); padding: var(--o-space-8) 0 var(--o-space-12); color: var(--o-muted-foreground); font-size: var(--o-font-size-sm); }
footer .wrap { display: flex; flex-wrap: wrap; gap: var(--o-space-3) var(--o-space-6); align-items: center; justify-content: space-between; }
.powered { display: inline-flex; align-items: center; gap: var(--o-space-2); }
.powered svg { height: 13px; width: auto; color: var(--o-foreground); }

@media (max-width: 860px) {
  .nav a:not([aria-current="page"]) { display: none; }
  .hero { padding: 56px 0 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .doc { grid-template-columns: 1fr; gap: var(--o-space-6); }
  .side { position: static; order: 2; max-height: none; }
}
@media (max-width: 520px) {
  .composer .row { flex-wrap: wrap; }
  .composer .row .btn { margin-left: auto; }
  .composer .url { order: 3; flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; padding: 0; }
  .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .stat .v { font-size: 32px; }
  .brand .product { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
