/* DB Mastermind website. Colors, radii, rules and the diagram notation are the app's own
   (apps/desktop/src/renderer/src/styles.css, features/diagram/DiagramView.tsx). */

/* Atkinson Hyperlegible Next and Mono, SIL Open Font License (fonts/OFL-*.txt). */
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2) format("woff2"); }
/* Fallbacks sized to the same width and line box, measured in Chrome, so nothing moves when the fonts arrive. */
@font-face { font-family: "Atkinson fallback"; src: local("Arial"), local("Helvetica Neue"); size-adjust: 97.36%; ascent-override: 100.66%; descent-override: 32.87%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Mono fallback"; src: local("Menlo"), local("Consolas"); size-adjust: 104.97%; ascent-override: 93.36%; descent-override: 30.49%; line-gap-override: 0%; }

:root {
  --ink: #1b1f27; --slate: #5b6372; --faint: #646b78;
  --paper: #ffffff; --chrome: #f6f7f9; --node: #ffffff;
  --rule: #cfd4db; --hair: #e3e6eb; --dots: #cfd4db;
  --accent: #6d4aff; --accent-text: #5b37f0; --accent-fg: #ffffff; --accent-soft: rgba(109, 74, 255, 0.1);
  --key: #8f5a0a; --link: #0b72d9; --hover: rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-shot: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 28px rgba(15, 23, 42, 0.08);
  --font: "Atkinson Hyperlegible Next", "Atkinson fallback", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", "Atkinson Mono fallback", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --gutter: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6e8ec; --slate: #a1a8b5; --faint: #8b919c;
    --paper: #16181d; --chrome: #1c1f25; --node: #22252c;
    --rule: #3a3f49; --hair: #2c3038; --dots: #2f333b;
    --accent: #8b6dff; --accent-text: #9d84ff; --accent-fg: #100c1f; --accent-soft: rgba(139, 109, 255, 0.16);
    --key: #f0b445; --link: #5aa9ff; --hover: rgba(255, 255, 255, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-shot: 0 1px 3px rgba(0, 0, 0, 0.4), 0 10px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e6e8ec; --slate: #a1a8b5; --faint: #8b919c;
  --paper: #16181d; --chrome: #1c1f25; --node: #22252c;
  --rule: #3a3f49; --hair: #2c3038; --dots: #2f333b;
  --accent: #8b6dff; --accent-text: #9d84ff; --accent-fg: #100c1f; --accent-soft: rgba(139, 109, 255, 0.16);
  --key: #f0b445; --link: #5aa9ff; --hover: rgba(255, 255, 255, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-shot: 0 1px 3px rgba(0, 0, 0, 0.4), 0 10px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* The app's six accents (Settings → Appearance), tried on the page from "Make it yours". Text uses the darker
   tier where the accent itself is under 4.5:1 on white. */
:root.accent-blue { --accent: #2563eb; --accent-text: #1d4fd0; --accent-soft: rgba(37, 99, 235, 0.1); }
:root.accent-teal { --accent: #0b7a76; --accent-text: #0b7a76; --accent-soft: rgba(15, 143, 138, 0.1); }
:root.accent-green { --accent: #16803c; --accent-text: #126b32; --accent-soft: rgba(22, 128, 60, 0.1); }
:root.accent-orange { --accent: #c2410c; --accent-text: #a8380a; --accent-soft: rgba(217, 89, 11, 0.1); }
:root.accent-rose { --accent: #d6336c; --accent-text: #bd2a5d; --accent-soft: rgba(214, 51, 108, 0.1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]).accent-blue { --accent: #4f8cff; --accent-text: #6b9fff; --accent-soft: rgba(79, 140, 255, 0.16); }
  :root:not([data-theme="light"]).accent-teal { --accent: #2bb5ae; --accent-text: #44c7c0; --accent-soft: rgba(43, 181, 174, 0.16); }
  :root:not([data-theme="light"]).accent-green { --accent: #3fbf6a; --accent-text: #58cd7f; --accent-soft: rgba(63, 191, 106, 0.16); }
  :root:not([data-theme="light"]).accent-orange { --accent: #ff8a3d; --accent-text: #ff9d5c; --accent-soft: rgba(255, 138, 61, 0.16); --accent-fg: #1a0d03; }
  :root:not([data-theme="light"]).accent-rose { --accent: #f06595; --accent-text: #f47fa7; --accent-soft: rgba(240, 101, 149, 0.16); }
}
:root[data-theme="dark"].accent-blue { --accent: #4f8cff; --accent-text: #6b9fff; --accent-soft: rgba(79, 140, 255, 0.16); }
:root[data-theme="dark"].accent-teal { --accent: #2bb5ae; --accent-text: #44c7c0; --accent-soft: rgba(43, 181, 174, 0.16); }
:root[data-theme="dark"].accent-green { --accent: #3fbf6a; --accent-text: #58cd7f; --accent-soft: rgba(63, 191, 106, 0.16); }
:root[data-theme="dark"].accent-orange { --accent: #ff8a3d; --accent-text: #ff9d5c; --accent-soft: rgba(255, 138, 61, 0.16); --accent-fg: #1a0d03; }
:root[data-theme="dark"].accent-rose { --accent: #f06595; --accent-text: #f47fa7; --accent-soft: rgba(240, 101, 149, 0.16); }

/* ---------------------------------------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--font); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
code, kbd, pre, .mono { font-family: var(--mono); }
code { font-size: 0.9em; padding: 0 0.2em; background: var(--chrome); border-radius: 4px; }
kbd { font-size: 0.875em; padding: 1px 6px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; background: var(--node); white-space: nowrap; }
em { font-style: normal; font-weight: 600; }
strong { font-weight: 600; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; color: var(--slate); }
.sprite .ring { fill: var(--paper); }
.skip { position: absolute; left: 8px; top: -48px; z-index: 10; padding: 8px 12px; background: var(--node); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1180px) { :root { --gutter: 48px; } }

/* Only one theme's screenshot is displayed (and so loaded). */
.theme-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dark { display: block; }
  :root:not([data-theme="light"]) .theme-light { display: none; }
}
:root[data-theme="dark"] .theme-dark { display: block; }
:root[data-theme="dark"] .theme-light { display: none; }

/* --- Header ----------------------------------------------------------------------------------------------- */
.top { border-bottom: 1px solid var(--hair); background: var(--paper); position: relative; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; margin-right: auto; }
.brand img { display: block; }
.nav { display: none; gap: 4px; }
.nav a, .menu nav a { color: var(--slate); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 6px; }
.nav a:hover, .menu nav a:hover { color: var(--ink); background: var(--hover); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 6px; font-size: 15px; color: var(--ink); min-height: 36px; display: flex; align-items: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 7px; height: 7px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); display: grid; gap: 8px; min-width: 220px; padding: 6px; background: var(--node); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow-shot); }
.menu nav { display: grid; }
.menu nav a { padding: 10px 12px; font-size: 16px; color: var(--ink); }
.theme-toggle.in-menu { justify-self: start; margin: 0 6px 6px; }
.top-in > .theme-toggle { display: none; }
@media (min-width: 720px) {
  .top-in > .theme-toggle { display: flex; }
  .theme-toggle.in-menu { display: none; }
}
@media (min-width: 1040px) {
  .nav { display: flex; }
  .menu { display: none; }
  .top-in { min-height: 64px; }
}
.theme-toggle { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--rule); border-radius: 8px; }
.theme-toggle button { display: grid; place-items: center; width: 32px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--slate); cursor: pointer; }
.theme-toggle button:hover { color: var(--ink); }
.theme-toggle button[aria-pressed="true"] { background: var(--chrome); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.theme-toggle button:disabled { opacity: 0.45; cursor: not-allowed; }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- Type ------------------------------------------------------------------------------------------------- */
h1 { font-size: 48px; line-height: 1; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.25; font-weight: 600; }
.lead { font-size: 18px; line-height: 1.45; color: var(--slate); max-width: 60ch; }
.body { max-width: 68ch; }
@media (min-width: 720px) {
  h1 { font-size: 60px; }
  h3 { font-size: 21px; }
}
@media (min-width: 1180px) {
  h2 { font-size: 36px; }
  .lead { font-size: 21px; }
}
@media (min-width: 1440px) {
  .hero h1 { font-size: 72px; }
}

/* --- Buttons ---------------------------------------------------------------------------------------------- */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.btn { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--rule); background: var(--node); color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.5; text-decoration: none; }
.btn:hover { background: var(--chrome); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn small { font-weight: 400; font-size: 14px; }
.btn small:empty { display: none; }
.only-phone { display: none; }
@media (max-width: 719px) {
  .only-phone { display: flex; }
  .not-phone { display: none !important; }
  .only-phone .btn { width: 100%; justify-content: center; }
}
/* The download button, with this system's other files right beside it (filled in by the download script). */
.download { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.download-alt { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.download-alt a, .more-links a { color: var(--ink); }
.more-links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.hero-text .more-links { margin-top: -6px; }

/* --- Hero: the app's diagram canvas ----------------------------------------------------------------------- */
.hero { background-color: var(--paper); background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.3px); background-size: 16px 16px; background-position: -8px -8px; border-bottom: 1px solid var(--hair); padding: 40px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "shot" "map"; gap: 40px; }
.hero-text { grid-area: text; display: grid; gap: 20px; align-content: start; }
.hero-text .lead { color: var(--ink); max-width: 38ch; text-wrap: pretty; }
.hero .dg { grid-area: map; }
.hero-shot { grid-area: shot; margin: 0; }
@media (min-width: 1180px) {
  .hero { padding: 40px 0 72px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 704px; grid-template-areas: "text map" "shot shot"; column-gap: 48px; row-gap: 32px; }
  .hero-text { padding-top: 0; gap: 22px; }
}

/* --- The product diagram ---------------------------------------------------------------------------------- */
.dg { position: relative; }
.dg-box { display: grid; gap: 0; }
.dg-lines { display: none; }
.node { width: 100%; background: var(--node); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
/* On phones each table folds (a <details>): its header says what it is and how many links it holds. */
.node-h { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; margin: 0; background: var(--accent); color: var(--accent-fg); font-weight: 600; font-size: 15px; line-height: 1; user-select: none; list-style: none; cursor: pointer; }
.node-h::-webkit-details-marker { display: none; }
.node-h::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 2px 4px 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.node[open] > .node-h::after { margin-bottom: -4px; transform: rotate(225deg); }
.node-count { font-weight: 400; font-size: 14px; min-width: 2ch; text-align: right; }
.node-h:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.node-h .g { width: 14px; height: 14px; }
.node-schema { margin-left: auto; font-weight: 400; font-size: 13px; }
.node ul { list-style: none; margin: 0; padding: 0; }
.node li a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-top: 1px solid var(--hair); color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.2; }
.node li a:hover { background: var(--hover); }
.node li a:focus-visible { outline-offset: -2px; border-radius: 0; }
.g { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.g-key { color: var(--key); }
.g-link { color: var(--link); }
.node-h .g-table { color: inherit; stroke-width: 2; }
.col { white-space: nowrap; }
.col.pk { font-weight: 600; }
.type { margin-left: auto; padding-left: 12px; font-family: var(--mono); font-size: 13px; color: var(--faint); white-space: nowrap; }
.dg-v { display: flex; align-items: center; gap: 8px; height: 40px; padding-left: 20px; color: var(--slate); font-size: 14px; }
.dg-v svg { color: var(--slate); overflow: visible; }
.dg-v path { fill: none; stroke: currentColor; stroke-width: 1.3; }
.dg-reset { position: absolute; right: 0; top: -36px; font: 600 14px/1 var(--font); color: var(--accent-text); background: var(--node); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.node[data-node="ai"], .node[data-node="terms"] { margin-top: 0; }
.node[data-node="terms"] { margin-top: 24px; }

/* From 768 px the diagram is a canvas: tables placed as in the app, lines between them. */
@media (min-width: 768px) {
  .dg { width: 704px; max-width: 100%; }
  .dg-box { display: block; position: relative; width: 704px; height: 316px; }
  .dg-lines { display: block; position: absolute; inset: 0; overflow: visible; color: var(--slate); pointer-events: none; }
  .dg-lines path { fill: none; stroke: currentColor; stroke-width: 1.3; }
  .dg-lines path.active { stroke: var(--accent); stroke-width: 2; }
  .dg-v { display: none; }
  .node { position: absolute; left: calc(var(--x) * 1px); top: calc(var(--y) * 1px); width: 200px; }
  /* Always open here, also where JavaScript doesn't run to open them. */
  .node::details-content { content-visibility: visible; display: block; }
  .node-count, .node-h::after { display: none; }
  .node[data-node="terms"] { margin-top: 0; }
  .node-h { min-height: 0; height: 32px; padding: 0 10px; gap: 6px; font-size: 13px; cursor: default; }
  .node-h .g { width: 12px; height: 12px; }
  .node-schema { font-size: 12px; }
  .node li a { min-height: 0; height: 24px; padding: 0 10px; gap: 6px; font-size: 13px; }
  .type { font-size: 12px; padding-left: 8px; }
  .node li a > span.g { width: 12px; }
  .dg.movable .node-h { cursor: grab; }
  .dg.dragging, .dg.dragging .node-h { cursor: grabbing; }
  .node.lifted { box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18); z-index: 2; }
}

/* --- Screenshots ------------------------------------------------------------------------------------------ */
.shot { margin: 40px 0 0; }
.shot picture { display: block; }
.shot picture.theme-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot picture.theme-dark { display: block; }
  :root:not([data-theme="light"]) .shot picture.theme-light { display: none; }
}
:root[data-theme="dark"] .shot picture.theme-dark { display: block; }
:root[data-theme="dark"] .shot picture.theme-light { display: none; }
.shot img { display: block; width: 100%; border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow-shot); background: var(--node); }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--slate); }
@media (max-width: 719px) { .shot picture img { cursor: zoom-in; } }
/* The tour: a video in the place and frame of a screenshot (its own picture is dark in both themes). */
.tour-shot { margin-top: 28px; }
.tour-shot video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow-shot); background: #0f1420; }
.hero-shot { margin: 0; }

/* --- Sections --------------------------------------------------------------------------------------------- */
.sec { padding: 64px 0 0; }
.sec > .wrap > h2 + .lead, .sec > .wrap > h2 + .body { margin-top: 16px; }
.sec > .wrap > .lead + .body, .sec > .wrap > .body + .body { margin-top: 20px; }
@media (min-width: 1180px) { .sec { padding-top: 96px; } }
.sec.small h2 { font-size: 30px; }
#who { padding-bottom: 96px; }

.engines { margin-top: 20px; max-width: 72ch; color: var(--slate); }
.engines strong { color: var(--ink); }

/* Lists in the diagram's manner: hairline rules, a key glyph for the main item, a link glyph for one that leads
   to another page. */
.items { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 48px; }
.items li { position: relative; padding: 20px 0 22px 24px; border-top: 1px solid var(--hair); }
.items li > .g { position: absolute; left: 0; top: 26px; width: 14px; height: 14px; }
.items h3 { margin-bottom: 6px; }
.items p { color: var(--slate); max-width: 60ch; }
@media (min-width: 900px) { .items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.also { margin-top: 24px; max-width: 72ch; color: var(--slate); }

/* "Where to start", and every table: the app's grid. */
.grid { width: 100%; margin-top: 32px; border-collapse: collapse; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; border-spacing: 0; background: var(--node); }
.grid th, .grid td { text-align: left; vertical-align: top; padding: 14px 18px; border-top: 1px solid var(--hair); }
.grid thead th { background: var(--chrome); color: var(--slate); font-weight: 600; font-size: 14px; padding: 10px 18px; border-top: 0; }
.grid tbody th { font-weight: 600; width: 28%; }
.grid td p + p { margin-top: 8px; }
.grid .go { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.grid thead th + th, .grid tbody td { border-left: 1px solid var(--hair); }
@media (max-width: 719px) {
  .start .grid, .start .grid tbody, .start .grid tr, .start .grid th, .start .grid td { display: block; width: auto; }
  .start .grid thead { display: none; }
  .start .grid tbody th { padding: 16px 16px 4px; border-top: 1px solid var(--hair); }
  .start .grid tbody tr:first-child th { border-top: 0; }
  .start .grid tbody td { padding: 0 16px 16px; border: 0; }
}

/* MCP setup: the app's segmented controls. */
.mcp { margin-top: 28px; border: 1px solid var(--rule); border-radius: 8px; background: var(--node); padding: 12px 16px 4px; }
.mcp-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: flex-start; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { font: inherit; font-size: 15px; min-height: 36px; padding: 5px 11px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--slate); cursor: pointer; }
.seg button:hover { color: var(--ink); background: var(--hover); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.seg.os { border: 1px solid var(--rule); border-radius: 8px; padding: 2px; }
.seg.os button { min-height: 32px; padding: 3px 10px; font-size: 14px; }
.seg.os button[aria-pressed="true"] { background: var(--chrome); box-shadow: inset 0 0 0 1px var(--hair); }
.mcp-where { margin: 14px 0 8px; color: var(--slate); }
.mcp-note { font-size: 14px; color: var(--slate); margin: 10px 0 12px; }
/* A command: it scrolls sideways inside its block, never wraps inside a word. The copy button (shown by site.js)
   is a column of its own at the right edge, so no character ever scrolls under it; at the top it sits centred on
   a one-line command and at the top right of a longer one. */
pre { margin: 0; padding: 14px 16px; background: var(--chrome); border: 1px solid var(--hair); border-radius: 6px; font-size: 14px; line-height: 1.5; overflow-x: auto; white-space: pre; color: var(--ink); }
.code { display: flex; align-items: stretch; background: var(--chrome); border: 1px solid var(--hair); border-radius: 6px; }
.code pre { flex: 1 1 auto; min-width: 0; background: none; border: 0; border-radius: 6px 0 0 6px; }
.copy { flex: none; display: grid; justify-items: center; align-content: start; width: 44px; padding: 8px 0 0; margin: 0; background: none; border: 0; border-left: 1px solid var(--hair); border-radius: 0 6px 6px 0; color: var(--slate); cursor: pointer; }
.copy svg { width: 32px; height: 32px; padding: 8px; border-radius: 6px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.copy:hover { color: var(--ink); }
.copy:hover svg { background: var(--hover); }
.copy:focus-visible { outline: none; }
.copy:focus-visible svg { outline: 2px solid var(--accent); outline-offset: -1px; }
.copy .g-check, .copy.done .g-copy { display: none; }
.copy.done .g-check { display: block; color: var(--accent-text); }
.os-cols .copy { padding-top: 7px; }
.npx { margin-top: 28px; }
.npx .code { margin: 10px 0; }
.tools { margin-top: 24px; color: var(--slate); }
.tools code { color: var(--ink); }

/* Privacy facts */
.facts { margin: 32px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 48px; }
.facts div { padding: 18px 0 20px; border-top: 1px solid var(--hair); }
.facts dt { font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--slate); max-width: 60ch; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Install */
.os-cols { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
.os-cols > div { padding: 20px 0 8px; border-top: 1px solid var(--hair); min-width: 0; }
.os-cols h3 { margin-bottom: 12px; }
.os-cols p { margin: 0 0 12px; color: var(--slate); }
.os-cols p strong { color: var(--ink); }
.os-cols .code { margin: 0 0 14px; }
.os-cols pre { font-size: 13px; }
@media (min-width: 1000px) { .os-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Make it yours: six accent dots, then six looks drawn as tiny windows (page, title bar, accent button). */
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 20px; }
.sw-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.sw-violet { background: #6d4aff; } .sw-blue { background: #2563eb; } .sw-teal { background: #0f8f8a; }
.sw-green { background: #16803c; } .sw-orange { background: #c2410c; } .sw-rose { background: #d6336c; }
.sw-look { width: 36px; height: 28px; padding: 0; border: 1px solid var(--rule); border-radius: 5px; cursor: pointer;
  background: linear-gradient(var(--bar), var(--bar)) top / 100% 7px no-repeat, linear-gradient(var(--acc), var(--acc)) right 4px bottom 4px / 12px 6px no-repeat, var(--page); }
.sw[aria-pressed="true"], .sw-look[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }
.sw:focus-visible, .sw-look:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.look-hint { margin-top: 14px; }

.links { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }

/* --- Footer ----------------------------------------------------------------------------------------------- */
.foot { margin-top: 0; padding: 32px 0 40px; background: var(--chrome); border-top: 1px solid var(--hair); color: var(--slate); font-size: 14px; }
.foot-links { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--ink); }
.trademark { font-size: 14px; }

/* --- Text pages ------------------------------------------------------------------------------------------- */
.page { padding: 48px 0 80px; }
.page > .wrap > * { max-width: 72ch; }
.page h1 { font-size: 36px; line-height: 1.1; margin-bottom: 16px; }
.page h2 { font-size: 24px; margin: 40px 0 10px; }
.page p, .page li { color: var(--slate); }
.page p + p { margin-top: 12px; }
.page ul, .page ol { padding-left: 20px; margin: 10px 0 0; }
.page li { margin: 6px 0; }
.page .callout { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 16px; margin: 8px 0 24px; }
.page .more { margin-top: 32px; font-weight: 600; }
.page .shot { margin-top: 24px; }
.page section { scroll-margin-top: 16px; }
.toc { margin: 28px 0 8px; padding: 16px 20px; border: 1px solid var(--rule); border-radius: 8px; background: var(--node); }
.toc ol { margin: 0; }
.page .grid { margin-top: 16px; }
.grid.keys td:first-child { white-space: nowrap; width: 1%; }
@media (max-width: 719px) { .grid.keys td:first-child { white-space: normal; } .grid th, .grid td { padding: 12px; } }
@media (min-width: 720px) { .page h1 { font-size: 48px; } .page h2 { font-size: 30px; } }
.notfound .grid { max-width: 560px; }
.notfound .grid thead th { font-weight: 400; color: var(--ink); }
.notfound .grid td { color: var(--slate); }

/* --- The app's six looks (Settings → Appearance), tried from "Make it yours" ------------------------------------
   Each maps the app's tokens (styles.css, :root.look-*) onto the site's: --bg → paper, --bg-subtle → chrome,
   --bg-elevated → node, --border(-strong) → hair / rule, --text(-muted/-faint) → ink / slate / faint,
   --warning → key, --info → link. Only the touches the app itself has are added: title-bar colors, the
   terminal's glow, a look's own font. Dark looks show the dark screenshots, light ones the light. */
:root.look-retro2001 {
  --ink: #000000; --slate: #3d3d3d; --faint: #4f4f4f;
  --paper: #ece9d8; --chrome: #e3dfca; --node: #fdfcf6;
  --rule: #8f8b75; --hair: #c4c0aa; --dots: #d2cdb6;
  --accent: #245edb; --accent-text: #1c4fbf; --accent-fg: #ffffff; --accent-soft: rgba(36, 94, 219, 0.14);
  --key: #8f5a0a; --link: #00639c; --hover: rgba(49, 106, 197, 0.1);
  --font: Tahoma, "Segoe UI", Verdana, sans-serif;
  color-scheme: light;
}
:root.look-terminal {
  --ink: #33ff66; --slate: #26c24d; --faint: #26c24d;
  --paper: #000000; --chrome: #050d07; --node: #06100a;
  --rule: #1a8a3c; --hair: #0f5f28; --dots: #0f3d1c;
  --accent: #33ff66; --accent-text: #66ff8c; --accent-fg: #000000; --accent-soft: rgba(51, 255, 102, 0.14);
  --key: #ffd75f; --link: #5fd7ff; --hover: rgba(51, 255, 102, 0.08);
  --shadow: none; --shadow-shot: none;
  --font: var(--mono);
  color-scheme: dark;
}
:root.look-halloween {
  --ink: #f3e6d0; --slate: #c7b293; --faint: #a08a6b;
  --paper: #14100c; --chrome: #1d1610; --node: #221a12;
  --rule: #55391f; --hair: #3a2a1a; --dots: #2e2216;
  --accent: #ff7518; --accent-text: #ff8c3f; --accent-fg: #140b02; --accent-soft: rgba(255, 117, 24, 0.16);
  --key: #f2d43c; --link: #a77bff; --hover: rgba(255, 117, 24, 0.08);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5); --shadow-shot: 0 1px 3px rgba(0, 0, 0, 0.5), 0 10px 32px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
:root.look-christmas {
  --ink: #2a1d14; --slate: #6b5847; --faint: #6f5b4b;
  --paper: #fffdf9; --chrome: #f6f1e9; --node: #ffffff;
  --rule: #cdbd9f; --hair: #e2d7c3; --dots: #e2d7c3;
  --accent: #17602f; --accent-text: #124d26; --accent-fg: #ffffff; --accent-soft: rgba(23, 96, 47, 0.1);
  --key: #8f5a0a; --link: #8a6508; --hover: rgba(15, 23, 42, 0.05);
  color-scheme: light;
}
:root.look-medieval {
  --ink: #3b2a17; --slate: #6b5434; --faint: #6a5435;
  --paper: #f8f0dc; --chrome: #efe2c3; --node: #fbf5e6;
  --rule: #a8895a; --hair: #cfb88a; --dots: #e2cfa6;
  --accent: #8b5a2b; --accent-text: #74481f; --accent-fg: #fff6e0; --accent-soft: rgba(139, 90, 43, 0.14);
  --key: #85600a; --link: #2f6b70; --hover: rgba(139, 90, 43, 0.09);
  --font: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: light;
}
:root.look-fantasy {
  --ink: #e8dcc0; --slate: #b3a58a; --faint: #958a76;
  --paper: #0f0d14; --chrome: #17141f; --node: #1c1826;
  --rule: #5a4a2a; --hair: #3a2f4a; --dots: #2a2236;
  --accent: #c9a227; --accent-text: #ddb63a; --accent-fg: #1a1405; --accent-soft: rgba(201, 162, 39, 0.16);
  --key: #f0b445; --link: #3fa7a0; --hover: rgba(201, 162, 39, 0.08);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5); --shadow-shot: 0 1px 3px rgba(0, 0, 0, 0.5), 0 10px 32px rgba(0, 0, 0, 0.4);
  --font: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: dark;
}

/* Their characteristic touches, as in the app. */
:root.look-terminal body { text-shadow: 0 0 4px rgba(51, 255, 102, 0.35); }
:root.look-terminal .brand img { filter: grayscale(1) sepia(1) hue-rotate(70deg) saturate(2.2) brightness(0.9); }
/* Title bars: blue (Retro 2001), holly red (Christmas), wood (Medieval); a gold rule under the header (Fantasy). */
:root.look-retro2001 .top { background-color: #1f5fd6; background-image: linear-gradient(#3a80f3, #1f5fd6); border-bottom-color: #1941a5; --band-fg: #ffffff; }
:root.look-christmas .top { background-color: #a91f17; border-bottom-color: #8a1912; --band-fg: #ffffff; }
:root.look-medieval .top { background-color: #5e3c1c; background-image: linear-gradient(#7a4f27, #5e3c1c); border-bottom-color: #4a2f15; --band-fg: #f8e7c2; }
:root:is(.look-retro2001, .look-christmas, .look-medieval) .top :is(.brand, .nav a, .menu summary, .top-in > .theme-toggle button) { color: var(--band-fg); }
:root:is(.look-retro2001, .look-christmas, .look-medieval) .top .nav a:hover { background: rgba(255, 255, 255, 0.16); }
:root:is(.look-retro2001, .look-christmas, .look-medieval) .top :is(.top-in > .theme-toggle, .menu summary) { border-color: rgba(255, 255, 255, 0.5); }
:root:is(.look-retro2001, .look-christmas, .look-medieval) .top .theme-toggle button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.18); box-shadow: none; }
:root.look-fantasy .top { border-bottom: 1px solid #c9a227; }
:root.look-retro2001 .shot img { border-radius: 0; }
/* Screenshots follow the look's own light or dark. */
:root:is(.look-terminal, .look-halloween, .look-fantasy) .shot picture.theme-dark { display: block; }
:root:is(.look-terminal, .look-halloween, .look-fantasy) .shot picture.theme-light { display: none; }
:root:is(.look-retro2001, .look-christmas, .look-medieval) .shot picture.theme-light { display: block; }
:root:is(.look-retro2001, .look-christmas, .look-medieval) .shot picture.theme-dark { display: none; }

@media print {
  .top, .foot, .hero-shot, .dg-lines, .swatches, .copy, .dg-reset { display: none !important; }
  .hero { background: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
