/* ============================================================
   NZP Design System — nzp-design.css
   Hosted: https://mar-go.hu/css/nzp-design.css
   Use: <link rel="stylesheet" href="https://mar-go.hu/css/nzp-design.css">
   Scope: Document-type HTML artifacts (reports, briefs, wiki, articles)
   Last updated: 2026-05-13 | Vera
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:            #f7f8f8;
  --surface:       #ffffff;
  --surface-2:     #fafbfb;
  --surface-soft:  #f3f4f4;
  --border:        rgba(15,23,42,.08);
  --border-strong: rgba(15,23,42,.14);
  --divider:       rgba(15,23,42,.06);

  --text:          #0f1729;
  --text-muted:    #525866;
  --text-subtle:   #8a8f99;

  --accent:        #0d9b6c;
  --accent-ink:    #075f43;
  --accent-soft:   #e8f6ef;
  --accent-edge:   #bfe4d2;

  --crit-bg:       #fdf1f1; --crit-edge: #f1c8c8; --crit-ink:  #8a2222;
  --warn-bg:       #fdf6e8; --warn-edge: #efd9a7; --warn-ink:  #7a5108;
  --info-bg:       #eff4fb; --info-edge: #cfd9ec; --info-ink:  #294679;
  --decide-bg:     #f4f1fb; --decide-edge:#d6cdec; --decide-ink:#4a3a8a;

  --radius-sm: 8px;
  --radius:    12px;

  --font-sans: ui-sans-serif,system-ui,-apple-system,"Segoe UI","Helvetica Neue",Arial,sans-serif;
  --font-mono: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","cv11";
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Page layout ---------- */
.nzp-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
/* Two-column with sidebar */
.nzp-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) {
  .nzp-layout { grid-template-columns: 1fr; padding: 18px 16px 60px; }
  .nzp-sidebar { display: none; }
}

/* ---------- Topbar ---------- */
.nzp-topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247,248,248,.88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nzp-topbar-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 13px 24px;
  display: flex; align-items: center; gap: 14px;
}
.nzp-brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 14px;
}
.nzp-brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.nzp-brand-sub {
  color: var(--text-subtle); font-weight: 500; font-size: 13px;
  border-left: 1px solid var(--border-strong);
  padding-left: 11px; margin-left: 3px;
}
.nzp-topbar-spacer { flex: 1; }
.nzp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: 12px; color: var(--text-muted);
}
.nzp-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* ---------- Sidebar ---------- */
.nzp-sidebar {
  position: sticky; top: 68px;
  max-height: calc(100vh - 88px); overflow-y: auto;
}
.nzp-sidebar-group { margin-bottom: 20px; }
.nzp-sidebar-label {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-subtle);
  padding: 0 10px; margin-bottom: 6px;
}
.nzp-sidebar-nav { list-style: none; padding: 0; margin: 0; }
.nzp-sidebar-nav a {
  display: block; padding: 6px 10px;
  color: var(--text-muted); border-radius: 7px;
  font-size: 13.5px; line-height: 1.4;
  transition: background .12s, color .12s;
}
.nzp-sidebar-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nzp-sidebar-nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* ---------- Typography ---------- */
h1,h2,h3,h4 { letter-spacing: -.012em; color: var(--text); margin: 0; }
h1 { font-size: 30px; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
h2 { font-size: 22px; font-weight: 650; line-height: 1.3; margin: 44px 0 14px; scroll-margin-top: 80px; }
h2:first-of-type { margin-top: 28px; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 22px 0 8px; }
h4 { font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
p { margin: 0 0 14px; }
p.lede { font-size: 17px; line-height: 1.55; color: var(--text-muted); margin-bottom: 0; max-width: 64ch; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-subtle); margin-bottom: 8px;
}

/* ---------- Hero ---------- */
.nzp-hero {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.nzp-version {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-size: 12px; color: var(--text-muted); font-family: var(--font-mono);
}
.nzp-version::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--accent); }

/* ---------- Breadcrumbs ---------- */
.nzp-breadcrumbs { font-size: 12.5px; color: var(--text-subtle); margin-bottom: 12px; }
.nzp-breadcrumbs span + span::before { content:"/"; margin: 0 7px; color: var(--border-strong); }

/* ---------- Divider ---------- */
hr.nzp-divider { border:none; height:1px; background:var(--border); margin: 48px 0 36px; }

/* ---------- Card ---------- */
.nzp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  transition: border-color .15s;
}
.nzp-card:hover { border-color: var(--border-strong); }
.nzp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 12px; margin: 14px 0 8px;
}
.nzp-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.nzp-card-initial {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
  border: 1px solid var(--accent-edge);
}
.nzp-card-initial--neutral { background: var(--surface-soft); color: var(--text); border-color: var(--border); }
.nzp-card-title { font-size: 14px; font-weight: 600; }
.nzp-card-body { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.nzp-card-meta { font-size: 12px; color: var(--text-subtle); margin-top: 6px; font-family: var(--font-mono); }

/* ---------- Callout ---------- */
.nzp-callout {
  border: 1px solid var(--border); border-left-width: 3px;
  border-radius: var(--radius); padding: 14px 16px 12px;
  margin: 18px 0; background: var(--surface);
  font-size: 14px; line-height: 1.6;
}
.nzp-callout-head {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; margin-bottom: 5px;
}
.nzp-callout-head .glyph {
  width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 5px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
}
.nzp-callout p:last-child { margin-bottom: 0; }
.nzp-callout ol, .nzp-callout ul { margin: 4px 0 0; padding-left: 20px; }
.nzp-callout li { margin: 4px 0; }

.nzp-callout--critical { border-left-color: var(--crit-ink);   background: var(--crit-bg); }
.nzp-callout--critical .nzp-callout-head { color: var(--crit-ink); }
.nzp-callout--critical .glyph { background: var(--crit-ink); color: #fff; }

.nzp-callout--note     { border-left-color: var(--accent);      background: var(--accent-soft); }
.nzp-callout--note .nzp-callout-head { color: var(--accent-ink); }
.nzp-callout--note .glyph { background: var(--accent); color: #fff; }

.nzp-callout--warning  { border-left-color: var(--warn-ink);    background: var(--warn-bg); }
.nzp-callout--warning .nzp-callout-head { color: var(--warn-ink); }
.nzp-callout--warning .glyph { background: var(--warn-ink); color: #fff; }

.nzp-callout--info     { border-left-color: var(--info-ink);    background: var(--info-bg); }
.nzp-callout--info .nzp-callout-head { color: var(--info-ink); }
.nzp-callout--info .glyph { background: var(--info-ink); color: #fff; }

.nzp-callout--decision { border-left-color: var(--decide-ink);  background: var(--decide-bg); }
.nzp-callout--decision .nzp-callout-head { color: var(--decide-ink); }
.nzp-callout--decision .glyph { background: var(--decide-ink); color: #fff; }

/* ---------- Table ---------- */
.nzp-table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin: 14px 0;
}
table.nzp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nzp-table th {
  text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text-subtle); letter-spacing: .07em; text-transform: uppercase;
  padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.nzp-table td { padding: 13px 16px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.nzp-table tr:last-child td { border-bottom: none; }
.nzp-table tr:hover td { background: var(--surface-2); }
.nzp-table td.muted { color: var(--text-muted); font-size: 13px; }

/* ---------- Rule list ---------- */
.nzp-rules {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin: 14px 0;
}
.nzp-rule {
  display: grid; grid-template-columns: 52px 1fr;
  padding: 13px 16px 13px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 14px; line-height: 1.55;
}
.nzp-rule:last-child { border-bottom: none; }
.nzp-rule-num {
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 600; color: var(--text-subtle);
}
.nzp-rule--critical .nzp-rule-num { color: var(--crit-ink); }
.nzp-rule--critical .nzp-rule-body strong:first-child { color: var(--crit-ink); }

/* ---------- Steps ---------- */
ol.nzp-steps {
  counter-reset: step; list-style: none; padding: 0;
  margin: 14px 0 14px 12px;
  border-left: 1px dashed var(--border-strong);
}
ol.nzp-steps > li {
  counter-increment: step;
  position: relative; padding: 3px 0 16px 26px;
  font-size: 14px;
}
ol.nzp-steps > li:last-child { padding-bottom: 0; }
ol.nzp-steps > li::before {
  content: counter(step);
  position: absolute; left: -12px; top: 0;
  width: 23px; height: 23px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-muted); display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}

/* ---------- Layer blocks ---------- */
.nzp-layer {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 11px 15px; margin-bottom: 8px;
}
.nzp-layer-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  margin-bottom: 5px; font-size: 13px; font-weight: 600;
}
.nzp-layer-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  padding: 2px 6px; border-radius: 5px;
  background: var(--surface-soft); color: var(--text-muted);
  border: 1px solid var(--divider);
}
.nzp-layer-body { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.nzp-layer-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nzp-layer--primary { border-left-color: var(--accent); }
.nzp-layer--primary .nzp-layer-tag { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-edge); }
.nzp-layer--neutral { border-left-color: var(--border-strong); }
.nzp-layer--muted   { border-left-color: #cdd1d8; }

/* ---------- Meta block (key-value grid) ---------- */
.nzp-meta {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 12px 20px; margin: 14px 0;
}
.nzp-meta dt {
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-subtle); margin-bottom: 2px;
}
.nzp-meta dd { margin: 0; font-size: 13.5px; color: var(--text); font-weight: 500; }

/* ---------- Code ---------- */
code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--surface-soft); border: 1px solid var(--divider);
  color: var(--accent-ink); padding: 1px 6px; border-radius: 5px;
}
pre.nzp-code {
  background: #0f1729; color: #e6e8ec;
  border-radius: var(--radius); padding: 14px 16px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  overflow-x: auto; margin: 12px 0 18px;
}
pre.nzp-code .c-mute { color: #8a93a8; }
pre.nzp-code .c-acc  { color: #6ce0b4; }
.nzp-code-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
}
.nzp-code-pill::before { content:"›"; color: var(--text-subtle); font-family: var(--font-sans); }

/* ---------- Tag / badge ---------- */
.nzp-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  padding: 3px 8px; background: var(--surface-soft);
  color: var(--text); border: 1px solid var(--divider); border-radius: 5px;
}
.nzp-tag--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-edge); }
.nzp-badge {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 2px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink);
}

/* ---------- Footer ---------- */
footer.nzp-footer {
  margin-top: 56px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-subtle);
}
footer.nzp-footer a { color: var(--text-muted); }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .nzp-topbar, .nzp-sidebar { display: none !important; }
  .nzp-layout { display: block; max-width: none; padding: 0; }
  .nzp-card, .nzp-callout, .nzp-layer, .nzp-meta,
  .nzp-table-wrap, .nzp-rules { break-inside: avoid; border-color: #999 !important; }
  pre.nzp-code { background: #f3f3f3 !important; color: #000 !important; }
  h1,h2,h3 { color: #000 !important; page-break-after: avoid; }
  a { color: #000 !important; text-decoration: underline; }
}
