/* macos-mcp.com — one stylesheet, no framework, no web fonts (nothing phones home). */
:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-2: #10161d;
  --bg-3: #161e27;
  --fg: #e8edf2;
  --fg-2: #aab4bf;
  --muted: #7d8794;
  --line: #222c37;
  --accent: #4fd1ff;
  --accent-2: #9be7ff;
  --ok: #3ddc84;
  --warn: #ffb454;
  --danger: #ff6b6b;
  --accent-soft: rgba(79, 209, 255, 0.11);
  --ok-soft: rgba(61, 220, 132, 0.11);
  --warn-soft: rgba(255, 180, 84, 0.11);
  --radius: 12px;
  --max: 72rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, Segoe UI, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.6 var(--font); font-feature-settings: "kern", "liga", "calt";
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd { font-family: var(--mono); }
code { background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; padding: 0.08em 0.4em; font-size: 0.88em; color: var(--accent-2); overflow-wrap: break-word; }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; overflow-x: auto; font-size: 0.9rem; line-height: 1.55; }
pre code { background: none; border: 0; padding: 0; color: var(--fg); font-size: inherit; white-space: pre; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 2.4em; }
h3 { font-size: 1.15rem; margin-top: 1.8em; }
h2 code, h3 code { font-size: 0.85em; }
p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li { margin: 0.3em 0; }
.lede { font-size: 1.2rem; color: var(--fg-2); }
.muted { color: var(--muted); }
strong { color: #fff; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
img { max-width: 100%; height: auto; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(11,15,20,0.85); backdrop-filter: saturate(150%) blur(8px); position: sticky; top: 0; z-index: 10; }
.site-nav { max-width: var(--max); margin: 0 auto; padding: 0.7rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--fg); font-weight: 650; letter-spacing: -0.01em; font-family: var(--mono); }
.brand:hover { text-decoration: none; }
.site-nav .links { display: flex; gap: 1.15rem; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav .links a { color: var(--fg-2); }
.site-nav .links a.active, .site-nav .links a:hover { color: var(--fg); text-decoration: none; }
.site-nav .links a.gh { color: var(--accent); }

/* Layout */
main { max-width: var(--max); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
main.docs, main.article { max-width: 52rem; }
.crumbs { max-width: 52rem; margin: 1.25rem auto -1.5rem; padding: 0 1.25rem; font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 0.35rem; }

/* Hero */
.hero { padding: 3.5rem 0 2.5rem; display: grid; gap: 1.25rem; max-width: 50rem; }
.hero h1 { margin: 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin: 0; }
.install { display: flex; align-items: center; gap: 0.75rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1.1rem; font-family: var(--mono); font-size: 0.98rem; overflow-x: auto; white-space: nowrap; }
.install .p { color: var(--muted); user-select: none; }
.install code { background: none; border: 0; padding: 0; color: var(--fg); font-size: inherit; }
.install button { margin-left: auto; background: var(--bg-3); border: 1px solid var(--line); color: var(--fg-2); border-radius: 8px; padding: 0.3rem 0.65rem; font: inherit; font-size: 0.8rem; cursor: pointer; }
.install button:hover { color: var(--fg); border-color: var(--accent); }
.hero .note { font-size: 0.9rem; color: var(--muted); margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.82rem; }
.badges span { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.7rem; color: var(--fg-2); background: var(--bg-2); }
.badges span b { color: var(--fg); font-weight: 600; }
.cta { display: inline-flex; gap: 0.5rem; align-items: center; background: var(--accent); color: #04121a; font-weight: 650; padding: 0.65rem 1.1rem; border-radius: 10px; }
.cta:hover { text-decoration: none; background: var(--accent-2); }
.cta.secondary { background: var(--bg-3); color: var(--fg); border: 1px solid var(--line); }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* Sections */
section { padding: 2.25rem 0; border-top: 1px solid var(--line); }
section h2 { margin-top: 0; }
.kicker { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p { margin: 0; color: var(--fg-2); font-size: 0.95rem; }
.card .n { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; display: block; margin-bottom: 0.4rem; }
.two { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 56rem) { .two { grid-template-columns: 1.1fr 1fr; } }
.stat { display: grid; gap: 0.15rem; }
.stat .num { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; color: #fff; line-height: 1; }
.stat .sub { color: var(--muted); font-size: 0.9rem; }
.stats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
th { background: var(--bg-3); color: var(--fg-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.yes { color: var(--ok); } .no { color: var(--muted); } .partial { color: var(--warn); }
/* "unknown" must not look like "no": the comparison table says so in words,
   and a reader who only scans the colors deserves the same answer. */
.unknown { color: var(--muted); font-style: italic; border-bottom: 1px dotted currentColor; }

/* Tool reference */
.tool { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }
.tool h3 { margin-top: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.tool h3 a { color: inherit; }
.badge { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.04em; border-radius: 999px; padding: 0.3rem 0.6rem; border: 1px solid var(--line); color: var(--fg-2); }
.badge.ro { color: var(--ok); border-color: rgba(61,220,132,0.4); }
.badge.destructive { color: var(--warn); border-color: rgba(255,180,84,0.4); }

/* FAQ */
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 0.75rem 1.1rem; margin: 0 0 0.6rem; }
summary { cursor: pointer; font-weight: 600; color: var(--fg); }
details p { margin: 0.6rem 0 0.2rem; color: var(--fg-2); }

/* Article */
.article .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.article blockquote { border-left: 3px solid var(--accent); margin: 1.25rem 0; padding: 0.2rem 1rem; color: var(--fg-2); }
.post-list { list-style: none; padding: 0; }
.post-list li { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--bg-2); }
.post-list h3 { margin: 0 0 0.3rem; }

/* Callouts */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-2); padding: 0.9rem 1.1rem; margin: 1.25rem 0; }
.callout.warn { border-left-color: var(--warn); }
.callout p:last-child { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 1.25rem 3rem; color: var(--fg-2); font-size: 0.92rem; }
.site-footer .cols { max-width: var(--max); margin: 0 auto 1.25rem; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.site-footer .fine { max-width: var(--max); margin: 0 auto; color: var(--muted); font-size: 0.82rem; }
.site-footer a { color: var(--fg-2); }
.site-footer a:hover { color: var(--fg); }

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .site-nav .links { gap: 0.8rem; font-size: 0.88rem; }
  .hero { padding-top: 2rem; }
  .stat .num { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------------------
   Components added for the "how do I actually use this" pass.
   Everything below is progressive: the markup reads correctly with CSS and JS
   both off, which is why the tabs are <section>s and the TOC is a plain list.
   --------------------------------------------------------------------------- */

/* A single soft glow behind the top of the page. Painted on ::before so it
   never enters the layout and never intercepts a click. */
body.landing { position: relative; }
body.landing::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 38rem; pointer-events: none; z-index: 0;
  background: radial-gradient(60rem 26rem at 22% -6rem, rgba(79, 209, 255, 0.16), transparent 70%);
}
/* Only the content is lifted above the glow. The header must keep the
   `position: sticky` its own rule gives it — a blanket `body.landing > *`
   here would overwrite it and drop the nav on the home page alone. */
body.landing > main, body.landing > .site-footer { position: relative; z-index: 1; }

/* Numbered steps. An <ol> so the order survives a screen reader and no-CSS. */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.1rem; }
.steps > li {
  counter-increment: step; position: relative; margin: 0;
  padding: 0 0 0 3.1rem;
}
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 999px;
  display: grid; place-items: center;
  font: 650 0.95rem/1 var(--mono); color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(79, 209, 255, 0.35);
}
/* The rail joining one step to the next; the last step has nothing to join. */
.steps > li::after {
  content: ""; position: absolute; left: 1.05rem; top: 2.3rem; bottom: -1.1rem;
  width: 1px; background: var(--line);
}
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.steps p { margin: 0 0 0.6rem; color: var(--fg-2); }
.steps p:last-child, .steps pre:last-child { margin-bottom: 0; }
.steps .sub { font-size: 0.9rem; color: var(--muted); }
.steps--compact > li { padding-left: 2.6rem; }
.steps--compact > li::before { width: 1.75rem; height: 1.75rem; font-size: 0.82rem; }
.steps--compact > li::after { left: 0.875rem; top: 1.95rem; }

/* The same badge on an <h2>, for a numbered page whose steps must keep their
   own anchors and their own line in the table of contents. */
.step-n {
  display: inline-grid; place-items: center; vertical-align: 0.06em;
  width: 1.7rem; height: 1.7rem; margin-right: 0.55rem; border-radius: 999px;
  font: 650 0.8rem/1 var(--mono); color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(79, 209, 255, 0.35);
}

/* What you can ask it: the prompt, then the tools that run. */
.prompts { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.prompt {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; display: grid; gap: 0.6rem; align-content: start;
}
.prompt .say {
  margin: 0; font-size: 1.02rem; color: var(--fg); line-height: 1.45;
  padding-left: 0.85rem; border-left: 2px solid var(--accent);
}
.prompt .say::before { content: "“"; } .prompt .say::after { content: "”"; }
.prompt .then { margin: 0; font-size: 0.92rem; color: var(--fg-2); }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chip, .chips li {
  font: 500 0.76rem/1.5 var(--mono); color: var(--fg-2);
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.16rem 0.6rem; display: inline-block; white-space: nowrap;
}
.chips li.arrow { border: 0; background: none; color: var(--muted); padding: 0.16rem 0.1rem; }

/* The request-path diagram. Boxes and arrows in HTML rather than an SVG: a
   drawing scaled down to a 360px screen renders 7px labels, and this one
   simply becomes a column with the arrows turned a quarter turn. */
.flow { margin: 1.75rem 0; padding: 0; }
.flow-row { display: flex; align-items: stretch; justify-content: center; gap: 0.75rem; }
.flow .node {
  flex: 1 1 0; min-width: 0; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.85rem 1rem;
}
.flow .node strong { display: block; font-size: 0.98rem; margin-bottom: 0.2rem; }
.flow .node .sub { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.flow .node ul { margin: 0.6rem 0 0; padding: 0; list-style: none; }
.flow .node li { margin: 0.2rem 0; font: 0.78rem/1.5 var(--mono); color: var(--fg-2); }
.flow .node.is-core { background: var(--accent-soft); border-color: rgba(79, 209, 255, 0.4); }
.flow .node.is-core strong { color: var(--fg); }
.flow .arrow {
  flex: 0 0 auto; display: grid; place-items: center; color: var(--accent);
  font: 1.35rem/1 var(--mono); padding: 0 0.1rem;
}
.flow .back {
  margin: 0.75rem 0 0; padding-top: 0.75rem; border-top: 1px dashed var(--line);
  color: var(--fg-2); font-size: 0.92rem; text-align: center;
}
.flow figcaption { margin-top: 0.75rem; color: var(--muted); font-size: 0.9rem; text-align: center; }
@media (max-width: 46rem) {
  .flow-row { flex-direction: column; }
  .flow .arrow { transform: rotate(90deg); padding: 0.1rem 0; }
}

/* On this page. Plain <details> so it collapses on a phone and costs no JS. */
.toc { margin: 0 0 2rem; background: var(--bg-2); }
.toc > summary { font: 600 0.8rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); }
.toc ol { margin: 0.9rem 0 0.2rem; padding-left: 1.3rem; column-gap: 2rem; font-size: 0.95rem; }
@media (min-width: 46rem) { .toc ol { columns: 2; } }
.toc li { margin: 0.25rem 0; break-inside: avoid; }
.toc a { color: var(--fg-2); }
.toc a:hover { color: var(--accent); }

/* Tabs. Every panel is visible until JS upgrades the group, so a client's
   instructions are never hidden behind a control that did not load. */
.tabs { margin: 0 0 1.5rem; }
.tabs .tablist { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.tabs .tablist button {
  font: inherit; font-size: 0.9rem; cursor: pointer;
  background: var(--bg-2); color: var(--fg-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.85rem;
}
.tabs .tablist button:hover { color: var(--fg); border-color: var(--accent); }
.tabs .tablist button[aria-selected="true"] {
  background: var(--accent-soft); color: var(--fg); border-color: rgba(79, 209, 255, 0.45);
}
.tabs .tabpanel > h3:first-child { margin-top: 0; }

/* Filter box (the 44-tool reference). */
.filter { display: grid; gap: 0.5rem; margin: 0 0 1.5rem; }
/* Hidden until JS upgrades it: a search box that filters nothing is worse
   than no search box. */
.filter[hidden] { display: none; }
.filter input {
  font: inherit; font-size: 1rem; width: 100%;
  background: var(--bg-2); color: var(--fg);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.9rem;
}
.filter input::placeholder { color: var(--muted); }
.filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filter .count { font-size: 0.88rem; color: var(--muted); min-height: 1.2em; }
[data-filtered="out"] { display: none; }

/* Copy button injected onto every code block. */
.codeblock { position: relative; }
.codeblock > pre { margin: 0; }
.codeblock + .codeblock { margin-top: 1.1rem; }
.copy-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font: inherit; font-size: 0.75rem; font-family: var(--mono); cursor: pointer;
  background: var(--bg-3); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 0.22rem 0.55rem;
  opacity: 0; transition: opacity 0.12s ease, color 0.12s ease;
}
.codeblock:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--fg); border-color: var(--accent); }
.copy-btn[data-done] { opacity: 1; color: var(--ok); border-color: rgba(61, 220, 132, 0.4); }
@media (hover: none) { .copy-btn { opacity: 1; } }

/* Keys, for the shortcut examples. */
kbd {
  font-size: 0.82em; background: var(--bg-3); color: var(--fg);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  padding: 0.1em 0.4em; white-space: nowrap;
}

/* Callout flavours beyond the default and .warn. */
.callout.tip { border-left-color: var(--ok); background: var(--ok-soft); }
.callout.tip strong, .callout.warn strong { color: var(--fg); }
.callout .label {
  display: block; font: 650 0.72rem/1 var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.45rem;
}
.callout.tip .label { color: var(--ok); }
.callout.warn .label { color: var(--warn); }

/* A cue that the answer is the honest "no" rather than a feature. */
.card.muted-card { background: none; }
.card.muted-card h3, .card.muted-card p { color: var(--fg-2); }

@media (max-width: 40rem) {
  /* Seven nav links wrapped into three ragged rows; one scrolling row reads
     better and keeps the header one line tall. */
  .site-nav { gap: 0.75rem; }
  .site-nav .links {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-bottom: 0.15rem;
    /* Without this the flex item refuses to shrink and scrolls the page
       sideways instead of itself. */
    min-width: 0;
  }
  .site-nav .links::-webkit-scrollbar { display: none; }
  .site-nav .links a { white-space: nowrap; }
  .steps > li { padding-left: 2.7rem; }
  .steps > li::before { width: 1.9rem; height: 1.9rem; font-size: 0.85rem; }
  .steps > li::after { left: 0.95rem; top: 2.1rem; }
}
