/* Mojo site — shares the desktop app's identity: cobalt accent, a dark "light table" for
   monitors, Bricolage Grotesque for display type, Instrument Sans for reading. */
:root {
  --paper: #eceff4;
  --surface: #ffffff;
  --ink: #131a2c;
  --muted: #5d6680;
  --line: #d3d8e3;
  --accent: #1f5bff;
  --accent-ink: #ffffff;
  --accent-soft: #e3eaff;
  --table: #0d1324;
  --table-grid: #1a2238;
  --glass: #18233f;
  --glow: #8fe3ff;
  --virtual: #b7f05a;
  --table-ink: #e8ecf6;
  --table-muted: #8b96b4;
  --ok: #17865a;
  --built: #b07400;
  --no: #8a93aa;
  --code-bg: #131a2c;
  --code-ink: #dfe6f7;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --r-s: 6px;
  --r-m: 10px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1422; --surface: #161d2f; --ink: #e8ecf6; --muted: #98a2bd; --line: #26304a;
    --accent: #5b84ff; --accent-ink: #0b1020; --accent-soft: #1b2648;
    --table: #080c18; --table-grid: #141b2e; --glass: #1a2645;
    --ok: #3ccf8e; --built: #f0b43c; --no: #6d7792; --code-bg: #0a0f1c; --code-ink: #dfe6f7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1422; --surface: #161d2f; --ink: #e8ecf6; --muted: #98a2bd; --line: #26304a;
  --accent: #5b84ff; --accent-ink: #0b1020; --accent-soft: #1b2648;
  --table: #080c18; --table-grid: #141b2e; --glass: #1a2645;
  --ok: #3ccf8e; --built: #f0b43c; --no: #6d7792; --code-bg: #0a0f1c; --code-ink: #dfe6f7;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 4px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35em; background: var(--surface); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 21px/1 var(--display); }
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.top nav a:hover { color: var(--accent); }
.theme-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center;
}
.theme-btn svg { width: 16px; height: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--r-m);
  font: 600 16px/1 var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }

/* Code blocks */
pre {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-m);
  padding: 16px 18px; margin: 0; overflow-x: auto; line-height: 1.55; font-size: 14px;
}
pre .c { color: #7f8bab; }
.copy-wrap { position: relative; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; background: #263252; color: #dfe6f7; border: 0;
  border-radius: 6px; padding: 4px 9px; font: 500 12px var(--body); cursor: pointer; opacity: 0.85;
}
.copy-btn:hover { opacity: 1; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 600; color: var(--muted); font-size: 13px; letter-spacing: 0.02em; background: var(--paper); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Status marks used by the parity matrix */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.st::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.st-ok::before { background: var(--ok); }
.st-built::before { background: transparent; border: 2px solid var(--built); width: 7px; height: 7px; }
.st-no::before { background: var(--no); opacity: 0.5; }
.st-ok { color: var(--ink); }
.st-built { color: var(--ink); }
.st-no { color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 96px; padding-block: 32px 48px; color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.foot a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav { gap: 14px; }
  .top nav .hide-sm { display: none; }
}
