/* ncz-os.com: one stylesheet, system fonts, no external requests. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f3f5f8;
  --text: #111418;
  --muted: #3a4048;
  --link: #0a4a9e;
  --link-visited: #5a2a91;
  --border: #c4cad3;
  --code-bg: #eef1f5;
  --code-text: #111418;
  --btn-bg: #0a4a9e;
  --btn-text: #ffffff;
  --warn-bg: #fff4d6;
  --warn-text: #3d2a00;
  --warn-border: #b07800;
  --focus: #c2410c;
  --tile: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216;
    --surface: #181c22;
    --text: #f1f3f5;
    --muted: #c8cdd4;
    --link: #9cc8ff;
    --link-visited: #d4b8ff;
    --border: #3b434e;
    --code-bg: #1d222a;
    --code-text: #f1f3f5;
    --btn-bg: #9cc8ff;
    --btn-text: #0f1216;
    --warn-bg: #2b2310;
    --warn-text: #ffe7a8;
    --warn-border: #c99a2e;
    --focus: #ffb347;
    --tile: #ffffff;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216;
  --surface: #181c22;
  --text: #f1f3f5;
  --muted: #c8cdd4;
  --link: #9cc8ff;
  --link-visited: #d4b8ff;
  --border: #3b434e;
  --code-bg: #1d222a;
  --code-text: #f1f3f5;
  --btn-bg: #9cc8ff;
  --btn-text: #0f1216;
  --warn-bg: #2b2310;
  --warn-text: #ffe7a8;
  --warn-border: #c99a2e;
  --focus: #ffb347;
  --tile: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.6;
  overflow-wrap: break-word;
}
main, .site-header .wrap, .site-footer .wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 3rem; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 8px; top: -100px;
  background: var(--btn-bg); color: var(--btn-text);
  padding: 0.5rem 1rem; border-radius: 6px; z-index: 10;
}
.skip-link:focus { top: 8px; }

/* Header and nav */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.site-name { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; margin-right: auto; }
.site-name:visited { color: var(--text); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.site-nav a { color: var(--text); font-weight: 600; text-decoration: none; padding: 0.25rem 0; display: inline-block; }
.site-nav a:visited { color: var(--text); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
.theme-toggle {
  font: inherit; font-size: 1rem; cursor: pointer;
  background: transparent; color: var(--text);
  border: 2px solid var(--border); border-radius: 6px; padding: 0.2rem 0.6rem;
}

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 2rem 0 0.75rem; }
h2 { font-size: 1.55rem; margin: 2.5rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
h3 { font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }
.lead { font-size: 1.3rem; }
.muted { color: var(--muted); }

/* Project cards on the home page: equal weight, same layout */
.cards { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.25rem; display: grid; grid-template-columns: 96px 1fr; gap: 0.5rem 1.25rem; align-items: start;
}
.card h2 { border: 0; padding: 0; margin: 0 0 0.25rem; font-size: 1.6rem; }
.card p { margin: 0 0 0.75rem; }
.card .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.logo-tile {
  width: 96px; height: 96px; border-radius: 16px; overflow: hidden;
  background: var(--tile); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.logo-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.project-head { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.project-head .logo-tile { width: 112px; height: 112px; flex: 0 0 112px; }
.project-head h1 { margin: 0; }
.tagline { font-size: 1.3rem; margin-top: 0.75rem; }

.btn {
  display: inline-block; background: var(--btn-bg); color: var(--btn-text);
  font-weight: 700; text-decoration: none; padding: 0.55rem 1.1rem; border-radius: 8px;
  border: 2px solid var(--btn-bg);
}
.btn:visited { color: var(--btn-text); }
.btn-secondary { background: transparent; color: var(--link); border-color: var(--link); }
.btn-secondary:visited { color: var(--link); }

/* On-page contents */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1.25rem; margin: 1.5rem 0; }
.toc ul { margin: 0; padding-left: 1.2rem; }

/* Code blocks */
pre, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; }
code { font-size: 0.92em; background: var(--code-bg); color: var(--code-text); padding: 0.1em 0.3em; border-radius: 4px; }
.code { position: relative; margin: 0 0 1.25rem; }
pre {
  background: var(--code-bg); color: var(--code-text); border: 1px solid var(--border);
  border-radius: 8px; padding: 1rem; margin: 0; font-size: 0.95rem; line-height: 1.5;
  white-space: pre; overflow-x: auto; overflow-wrap: normal;
}
/* Agent prompts are prose: let them wrap instead of scrolling. */
.code.prompt pre { white-space: pre-wrap; overflow-wrap: break-word; }
pre code { background: none; padding: 0; font-size: inherit; }
.copy-btn {
  font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  margin-top: 0.4rem; background: var(--btn-bg); color: var(--btn-text);
  border: 2px solid var(--btn-bg); border-radius: 6px; padding: 0.3rem 0.9rem;
}

.note {
  background: var(--warn-bg); color: var(--warn-text);
  border-left: 6px solid var(--warn-border); border-radius: 6px;
  padding: 0.9rem 1.1rem; margin: 0 0 1.25rem;
}
.note a { color: var(--warn-text); }
.note > strong:first-child { display: block; margin-bottom: 0.25rem; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

/* Repo lists */
.repo-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.repo-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); margin: 0; }
.repo-list a { font-weight: 700; }
.repo-list .desc { display: block; color: var(--muted); }
.repo-list .tag { color: var(--muted); font-weight: 600; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.copy-hint { margin-left: 0.6rem; font-size: 0.95rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 1.5rem 0 2rem; font-size: 1rem; }
.site-footer ul { padding-left: 1.2rem; }

@media (max-width: 30rem) {
  body { font-size: 1.125rem; }
  h1 { font-size: 1.8rem; }
  .card { grid-template-columns: 1fr; }
  .project-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Screenshots */
.shot { margin: 1.5rem 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 0.6rem; background: var(--surface); }
.shot figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 1rem; }
