/* NikOS site styles. Nord-derived palette, matching the desktop theme the
   installer applies. Light and dark are both first-class; the dark values are
   the Nord polar-night set. */

:root {
  --paper: #ECEFF4;
  --paper-raised: #FFFFFF;
  --ink: #2E3440;
  --ink-soft: #4C566A;
  --rule: #D8DEE9;
  --frost: #5E81AC;
  --frost-bright: #88C0D0;
  --aurora-green: #A3BE8C;
  --aurora-amber: #D08770;
  --terminal: #2E3440;
  --terminal-ink: #D8DEE9;
  --dim: #8FA1B3;
  --shadow: 0 1px 2px rgba(46, 52, 64, .06), 0 8px 24px rgba(46, 52, 64, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #2E3440;
    --paper-raised: #3B4252;
    --ink: #ECEFF4;
    --ink-soft: #C1C9D6;
    --rule: #434C5E;
    --frost: #88C0D0;
    --frost-bright: #8FBCBB;
    --aurora-green: #A3BE8C;
    --aurora-amber: #EBCB8B;
    --terminal: #242933;
    --terminal-ink: #D8DEE9;
    --dim: #7B8794;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Public Sans", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.6em; }
h3 { font-size: 1.16rem; font-weight: 600; margin-top: 2em; }

p { margin: 0 0 1.1em; }
a { color: var(--frost); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--frost-bright); }

code, kbd, pre {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  font-size: .87em;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .1em .38em;
}

pre {
  background: var(--terminal);
  color: var(--terminal-ink);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-size: .87rem;
  line-height: 1.6;
  margin: 0 0 1.4em;
}

pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 1em; }
pre .c { color: var(--dim); }
pre .p { color: var(--frost-bright); }

/* Copy button. The shell and bar are added by copy.js, so without JavaScript
   the code block renders exactly as it did before.

   The button lives in a bar above the code, not floating over it: install
   commands scroll horizontally, and a floating button covers the end of the
   line precisely when someone scrolls across to read it. */
.code-block { margin: 0 0 1.4em; }

.code-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: var(--terminal);
  border-radius: 10px 10px 0 0;
  padding: .45rem .5rem .1rem;
}

.code-block pre { border-radius: 0 0 10px 10px; margin: 0; }

.copy-btn {
  font-family: "Public Sans", sans-serif;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
  padding: .38rem .7rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--dim);
  background: transparent;
  border: 1px solid rgba(216, 222, 233, .24);
  transition: color .12s, border-color .12s, background .12s;
}

.copy-btn:hover {
  color: var(--terminal-ink);
  border-color: rgba(216, 222, 233, .5);
  background: rgba(255, 255, 255, .08);
}

.copy-btn:focus-visible { outline: 2px solid var(--frost-bright); outline-offset: 2px; }
.copy-btn[data-state="copied"] { color: var(--aurora-green); border-color: var(--aurora-green); }
.copy-btn[data-state="failed"] { color: var(--aurora-amber); border-color: var(--aurora-amber); }

@media (max-width: 620px) {
  .copy-btn { font-size: .72rem; padding: .32rem .55rem; }
}

/* ── Layout ───────────────────────────────────────────────────────────── */

.wrap { max-width: 940px; margin: 0 auto; padding: 0 1.4rem; }

header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
}

/* The whisker-menu N, drawn to stay legible small. */
.brand img { width: 21px; height: 21px; }

nav.site { display: flex; gap: 1.15rem; margin-left: auto; flex-wrap: wrap; }
nav.site a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--frost); }
nav.site a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

main { padding: 3rem 0 4rem; }

footer.site {
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: .9rem;
  padding: 2rem 0 3rem;
}

footer.site .wrap { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }

/* ── Components ───────────────────────────────────────────────────────── */

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }

.tagline {
  font-family: "JetBrains Mono", monospace;
  font-size: .82rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--frost);
  margin-bottom: .9rem;
}

.hero { display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap; }
.hero-text { flex: 1 1 340px; }
.hero-mark { flex: 0 0 150px; }
.hero-mark img { width: 100%; height: auto; }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.6rem; }

.btn {
  display: inline-block;
  padding: .58rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid var(--frost);
}

.btn-primary { background: var(--frost); color: var(--paper-raised); }
.btn-primary:hover { background: var(--frost-bright); color: var(--terminal); }
.btn-ghost { color: var(--frost); }
.btn-ghost:hover { background: var(--paper-raised); }

.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.6rem 0 0; }

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 { margin-top: 0; font-size: 1rem; }
.card p { margin-bottom: 0; font-size: .93rem; color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }

.note {
  border-left: 3px solid var(--aurora-amber);
  background: var(--paper-raised);
  padding: .9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: .95rem;
}

.note strong { color: var(--ink); }

.table-scroll { overflow-x: auto; margin: 0 0 1.6em; }

table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
td code { white-space: nowrap; }
tbody tr:hover { background: var(--paper-raised); }

.size { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

figure { margin: 2rem 0; }
figure svg { width: 100%; height: auto; display: block; }

figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
figcaption { font-size: .87rem; color: var(--ink-soft); margin-top: .7rem; text-align: center; }

.repo-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin: 1.2rem 0 0; }

.repo {
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  border-radius: 10px;
  padding: .9rem 1rem;
}

.repo h4 { margin: 0 0 .3rem; font-size: .98rem; font-weight: 600; }
.repo h4 a { text-decoration: none; }
.repo p { margin: 0 0 .5rem; font-size: .89rem; color: var(--ink-soft); line-height: 1.5; }
.repo .links { font-size: .82rem; display: flex; gap: .8rem; }

ul.tight { margin: 0 0 1.2em; padding-left: 1.2rem; }
ul.tight li { margin-bottom: .35em; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: .6rem;
  background: var(--paper-raised);
  padding: .5rem .9rem;
  border-radius: 6px;
  z-index: 20;
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  main { padding: 2rem 0 3rem; }
  nav.site { gap: .85rem; width: 100%; margin-left: 0; }
}
