/* ==========================================================================
   nezprod — Task 7: tool views (Rokovi, Dokumentacija, Test, Generatori).

   Shared ........ nz-tool (head, split, side, sticky, section), nz-seg, nz-progress
   Rokovi ........ nz-rk-*, nz-tl (timeline)
   Dokumentacija . nz-dk-*
   Test .......... nz-kv-*
   Generatori .... nz-gen-*, nz-d1 (Dodatak I sheet)
   Print ......... html.nz-print-scoped [data-print-hide] (js printOnly)
   ========================================================================== */

/* ── Shared tool layout ─────────────────────────────────────────────────── */
.nz-tool {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  min-width: 0;
}
.nz-tool__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
}
.nz-tool__headtext {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 780px;
}
.nz-tool__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  min-width: 0;
}
.nz-tool__main,
.nz-tool__side {
  min-width: 0;
}
@media (min-width: 980px) {
  .nz-tool__split {
    grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
    gap: var(--s-7);
    align-items: start;
  }
  .nz-tool__split--wide {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  }
  .nz-tool__split--score {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  }
  .nz-tool__sticky {
    position: sticky;
    top: 72px;
  }
}
.nz-tool__sticky {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.nz-tool__section {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  padding-top: var(--s-6);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 72px;
}
.nz-tool__sechead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
}
.nz-tool__sectext {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 78ch;
}
.nz-tool__intro {
  font-size: 15px;
  line-height: 1.55;
  color: var(--paper-dim);
}
.nz-tool__intro .nz-cites {
  display: inline-flex;
}
.nz-tool__secactions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* Segmented control from radio buttons */
.nz-seg {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.nz-seg__legend {
  display: block;
  margin-bottom: 8px;
  padding: 0;
}
.nz-seg__opts {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  border: 1.5px solid var(--rule);
}
.nz-seg__opt {
  position: relative;
  display: inline-flex;
  flex: 1 1 auto;
}
.nz-seg__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.nz-seg__label {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  color: var(--paper-dim);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.nz-seg__opt + .nz-seg__opt .nz-seg__label {
  border-left: 1.5px solid var(--rule);
}
.nz-seg__opt:hover .nz-seg__label {
  color: var(--paper);
}
.nz-seg__opt input:checked + .nz-seg__label {
  background: var(--paper);
  color: var(--ink);
}
.nz-seg__opt input:focus-visible + .nz-seg__label {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Progress bar */
.nz-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.nz-progress__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.nz-progress__label {
  font-size: 14px;
  font-weight: 600;
}
.nz-progress__num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.nz-progress__track {
  height: 6px;
  background: var(--rule);
}
.nz-progress__fill {
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width var(--dur-panel) var(--ease-panel);
}
.nz-progress.is-complete .nz-progress__fill {
  background: var(--hue-green);
}

/* Small shared bits */
.nz-tool .nz-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Rokovi ────────────────────────────────────────────────────────────── */
.nz-rk-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  margin-top: var(--s-3);
}
.nz-rk-form input[type='date'] {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.01em;
}
.nz-rk-series {
  min-height: 32px;
}
.nz-rk-formactions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.nz-rk-privacy {
  font-size: 12.5px;
  color: var(--text-dim);
}
.nz-rk-out {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  min-width: 0;
}
.nz-rk-outhead {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 700px) {
  .nz-rk-outhead {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }
}
.nz-rk-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
}
.nz-rk-next__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.nz-rk-next__date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper-dim);
}
.nz-rk-next__date b {
  color: var(--paper);
  font-weight: 500;
}
.nz-rk-icsbox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  max-width: 300px;
}
.nz-rk-icshint {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-dim);
}

/* The timeline: date column | rail | content */
.nz-tl {
  --tl-date: 150px;
  --tl-rail: 28px;
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nz-tl::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: calc(var(--tl-date) + var(--tl-rail) / 2);
  width: 1.5px;
  background: var(--rule);
}
.nz-tl__item {
  position: relative;
  display: grid;
  grid-template-columns: var(--tl-date) var(--tl-rail) minmax(0, 1fr);
  padding-bottom: var(--s-5);
}
.nz-tl__when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  padding-top: 1px;
  padding-right: 10px;
  text-align: right;
}
.nz-tl__date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.35;
}
.nz-tl__date b {
  font-weight: 500;
  color: var(--paper);
  font-size: 14px;
}
.nz-tl__wd,
.nz-tl__to {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.nz-tl__rel {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nz-tl__dot {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border: 2px solid var(--paper-dim);
  border-radius: 50%;
  background: var(--ink);
}
.nz-tl__item--deadline .nz-tl__dot {
  border-color: var(--red);
  background: var(--red);
}
.nz-tl__item--window .nz-tl__dot {
  width: 13px;
  height: 22px;
  border-color: var(--hue-blue);
  border-radius: 7px;
  background: color-mix(in oklab, var(--hue-blue) 35%, var(--ink));
}
.nz-tl__item--info .nz-tl__dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-width: 1.5px;
}
.nz-tl__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding-left: 6px;
}
.nz-tl__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--paper);
}
.nz-tl__item--deadline .nz-tl__title::after {
  content: 'rok';
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--red);
  color: var(--red-text);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.nz-tl__text {
  max-width: 68ch;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--paper-dim);
}
.nz-tl__warn {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 68ch;
  padding: 9px 12px;
  border: 1.5px solid var(--hue-amber);
  font-size: 14px;
  line-height: 1.45;
  color: var(--paper);
}
.nz-tl__warn i {
  margin-top: 3px;
  color: var(--hue-amber);
}
.nz-tl__item.is-past .nz-tl__body,
.nz-tl__item.is-past .nz-tl__when {
  opacity: 0.62;
}
.nz-tl__item.is-past .nz-tl__dot {
  border-color: var(--muted);
  background: var(--ink);
}
.nz-tl__item.is-now .nz-tl__dot {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--hue-blue) 30%, transparent);
}
.nz-tl__item.is-now .nz-tl__rel {
  color: var(--paper);
}

/* Today marker */
.nz-tl__today {
  position: relative;
  display: grid;
  grid-template-columns: var(--tl-date) minmax(0, 1fr);
  align-items: center;
  margin: -6px 0 var(--s-4);
}
.nz-tl__todaylabel {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-text);
}
.nz-tl__todaylabel b {
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nz-tl__todayline {
  position: relative;
  height: 2px;
  background: var(--red);
}
.nz-tl__todayline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--tl-rail) / 2 - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-50%);
}

.nz-rk-undated {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-top: var(--s-5);
  border-top: 1px dashed var(--rule);
}
.nz-rk-undatedlist {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nz-rk-undatedlist li {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 1.5px dashed var(--rule);
}
.nz-rk-undated__title {
  font-weight: 700;
}
.nz-rk-undated__need {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--red-text);
}
.nz-rk-undated__text {
  font-size: 14px;
  color: var(--text-dim);
}
.nz-rk-pdwrap {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}
.nz-rk-pdhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
}
.nz-rk-pd {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
}
.nz-rk-pd::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.nz-rk-pd--yes::before {
  background: var(--hue-green);
}
.nz-rk-pd--maybe::before {
  background: var(--hue-amber);
}

@media (max-width: 639.98px) {
  /* Phone: the rail moves to the left edge, the date sits above the text. */
  .nz-tl {
    --tl-rail: 22px;
  }
  .nz-tl::before {
    left: calc(var(--tl-rail) / 2);
  }
  .nz-tl__item {
    grid-template-columns: var(--tl-rail) minmax(0, 1fr);
    grid-template-areas: 'dot when' '. body';
    row-gap: 4px;
  }
  .nz-tl__dot {
    grid-area: dot;
  }
  .nz-tl__when {
    grid-area: when;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    padding: 0 0 0 6px;
    text-align: left;
  }
  .nz-tl__date {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
  }
  .nz-tl__body {
    grid-area: body;
  }
  .nz-tl__today {
    grid-template-columns: minmax(0, 1fr);
    margin: 0 0 var(--s-4);
  }
  .nz-tl__todaylabel {
    justify-content: flex-start;
    padding: 0 0 4px calc(var(--tl-rail) + 6px);
  }
  .nz-tl__todayline::before {
    left: calc(var(--tl-rail) / 2 - 5px);
  }
  .nz-rk-icsbox {
    max-width: none;
  }
  /* PD table: one stacked block per year (year | filing window over status). */
  .nz-rk-pdwrap thead {
    display: none;
  }
  .nz-rk-pdwrap table,
  .nz-rk-pdwrap tbody {
    display: block;
  }
  .nz-rk-pdwrap tr {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 2px 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
  }
  .nz-rk-pdwrap th,
  .nz-rk-pdwrap td {
    padding: 0 !important;
    border: 0 !important;
  }
  .nz-rk-pdwrap th {
    grid-row: span 2;
  }
  .nz-rk-pdwrap .nz-table tbody tr:hover > * {
    background: none;
  }
  .nz-rk-icsbox .nz-btn {
    width: 100%;
  }
}

/* ── Dokumentacija ─────────────────────────────────────────────────────── */
.nz-dk-tabs {
  margin-bottom: calc(-1 * var(--s-3));
}
.nz-dk-tabcount {
  margin-left: 2px;
  padding: 1px 6px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.nz-dk-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  outline: none;
}
.nz-dk-top {
  display: grid;
  gap: var(--s-4);
  align-items: end;
}
@media (min-width: 700px) {
  .nz-dk-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
.nz-dk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.nz-dk-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.nz-dk-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.nz-dk-grouphead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--s-4);
}
.nz-dk-gcount {
  margin-left: 6px;
  color: var(--paper);
}
.nz-dk-groupnote {
  flex: 1 1 260px;
  font-size: 13px;
  color: var(--text-dim);
}
.nz-dk-items {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.nz-dk-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--rule);
}
.nz-dk-check {
  position: relative;
  display: flex;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -8px;
  cursor: pointer;
}
.nz-dk-cb,
.nz-kv-cb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.nz-dk-box,
.nz-kv-q__box {
  position: relative;
  width: 24px;
  height: 24px;
  margin-top: 10px;
  border: 1.5px solid var(--paper-dim);
  background: transparent;
  transition: background-color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
.nz-dk-box::after,
.nz-kv-q__box::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 6px;
  height: 11px;
  border-right: 2.5px solid var(--on-red);
  border-bottom: 2.5px solid var(--on-red);
  transform: rotate(45deg) scale(0);
  transition: transform var(--dur-chip) var(--ease-out);
}
.nz-dk-cb:checked + .nz-dk-box,
.nz-kv-cb:checked + .nz-kv-q__box {
  border-color: var(--red-fill);
  background: var(--red-fill);
}
.nz-dk-cb:checked + .nz-dk-box::after,
.nz-kv-cb:checked + .nz-kv-q__box::after {
  transform: rotate(45deg) scale(1);
}
.nz-dk-cb:focus-visible + .nz-dk-box,
.nz-kv-cb:focus-visible + .nz-kv-q__box {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.nz-dk-check:hover .nz-dk-box,
.nz-kv-q__hit:hover .nz-kv-q__box {
  border-color: var(--paper);
}
.nz-dk-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.nz-dk-titlerow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}
.nz-dk-n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.nz-dk-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.nz-dk-item.is-done .nz-dk-title {
  color: var(--paper-dim);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
}
.nz-dk-wording {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim);
  font-style: italic;
}
.nz-dk-hint {
  max-width: 72ch;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--paper-dim);
}
.nz-dk-lead {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: 72ch;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--paper);
}
.nz-dk-lead i {
  margin-top: 3px;
  color: var(--hue-amber);
}
.nz-dk-item--red .nz-dk-lead i {
  color: var(--red-text);
}
.nz-dk-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px var(--s-4);
}
.nz-dk-where {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--paper-dim);
}
.nz-dk-where__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nz-dk-item.has-lead {
  background: linear-gradient(90deg, color-mix(in oklab, var(--hue-amber) 7%, transparent), transparent 70%);
}
.nz-dk-item--red.has-lead {
  background: linear-gradient(90deg, var(--red-soft), transparent 70%);
}
.nz-dk-item.is-done.has-lead {
  background: none;
}

/* PU potvrda: "vrijedi do" */
.nz-dk-valid {
  display: grid;
  grid-template-columns: auto minmax(150px, 190px);
  align-items: center;
  gap: 6px var(--s-3);
  max-width: 560px;
  padding: 12px 14px;
  border: 1.5px solid var(--rule);
  background: var(--panel);
}
.nz-dk-valid > .nz-field__label {
  margin: 0;
}
.nz-dk-valid__field input {
  font-family: var(--font-mono);
}
.nz-dk-valid__out,
.nz-dk-valid .nz-cites {
  grid-column: 1 / -1;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--paper-dim);
}
.nz-dk-valid__out b {
  color: var(--paper);
}
.nz-dk-valid__out.is-ok b::before {
  content: '● ';
  content: '● ' / '';
  color: var(--hue-green);
}
.nz-dk-valid__out.is-bad b::before {
  content: '● ';
  content: '● ' / '';
  color: var(--red);
}
.nz-dk-valid__out.is-bad {
  color: var(--paper);
}

.nz-dk-notes summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
}
.nz-dk-notes summary::-webkit-details-marker {
  display: none;
}
.nz-dk-notes summary:hover {
  color: var(--paper);
}
.nz-dk-notes[open] summary {
  color: var(--paper);
}
.nz-dk-notedot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.nz-dk-note {
  display: block;
  width: 100%;
  max-width: 640px;
  min-height: 56px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
}
.nz-dk-note:focus {
  border-color: var(--focus);
  outline: none;
}
.nz-dk-after {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-top: var(--s-5);
  border-top: 1px dashed var(--rule);
}
.nz-dk-afterlist {
  display: grid;
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nz-dk-afterlist li {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  border-left: 1.5px solid var(--rule);
}
.nz-dk-after__title {
  font-weight: 700;
}
.nz-dk-after__hint {
  font-size: 14px;
  color: var(--paper-dim);
}
.nz-dk-submitlist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nz-dk-submitlist li {
  font-size: 14px;
  line-height: 1.5;
}
.nz-dk-submitlist .nz-cites {
  display: inline-flex;
  margin-top: 4px;
}
.nz-dk-link {
  color: var(--paper);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.nz-dk-link:hover {
  color: var(--red-text);
  text-decoration-color: currentColor;
}

/* ── Test (Kvalifikacijski test) ───────────────────────────────────────── */
.nz-kv-only .nz-callout__body p {
  max-width: 80ch;
}
.nz-kv-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.nz-kv-sec {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.nz-kv-sechead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 1.5px solid var(--paper);
}
.nz-kv-sectitle {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.nz-kv-secletter {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--red-text);
}
.nz-kv-secmax,
.nz-kv-partmax {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.nz-kv-partmax {
  margin-left: auto;
  padding-left: 12px;
}
.nz-kv-parttitle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: var(--s-3);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
}
.nz-kv-parttitle > span:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--red-text);
}
.nz-kv-parttext {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
}
.nz-kv-qs {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nz-kv-q {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: var(--s-3);
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.nz-kv-q__hit {
  position: relative;
  display: flex;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -8px;
  cursor: pointer;
}
.nz-kv-q__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.nz-kv-q__text {
  font-size: 15px;
  line-height: 1.5;
}
.nz-kv-q__id {
  margin-right: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.nz-kv-q__must {
  margin-left: 8px;
  vertical-align: 2px;
}
.nz-kv-q__help {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.nz-kv-q__help .nz-cites {
  display: inline-flex;
}
.nz-kv-q__pts {
  align-self: start;
  min-width: 34px;
  padding: 3px 6px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  color: var(--text-dim);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.nz-kv-q.is-on .nz-kv-q__pts {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}
.nz-kv-q.is-mandatory:not(.is-on) {
  background: linear-gradient(90deg, var(--red-soft), transparent 75%);
}
.nz-kv-roles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nz-kv-roles__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nz-kv-roles__list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nz-kv-roles__list li {
  padding: 2px 8px;
  border: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--paper-dim);
}
.nz-kv-dwrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}
.nz-kv-workseg .nz-seg__label,
.nz-kv-modeseg .nz-seg__label {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
}
.nz-kv-parthelp {
  max-width: 76ch;
}
.nz-kv-share {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-4) 0 var(--s-2);
}
.nz-kv-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--s-4) var(--s-5);
  max-width: 560px;
}
.nz-kv-inputs input {
  font-family: var(--font-mono);
  font-size: 17px !important;
}
.nz-kv-shareout {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper-dim);
}
.nz-kv-tiers {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.nz-kv-tier {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--s-3);
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-dim);
  transition: color var(--dur-hover) ease;
}
.nz-kv-tier__pts {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
}
.nz-kv-tier.is-hit {
  color: var(--paper);
}
.nz-kv-tier.is-hit .nz-kv-tier__pts {
  background: var(--paper);
  color: var(--ink);
}

/* Score panel */
.nz-kv-panel {
  --s-a: var(--hue-amber);
  --s-b1: var(--hue-blue);
  --s-b2: var(--hue-violet);
  --s-c: var(--hue-green);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: 22px 22px 18px;
  border: 1.5px solid var(--rule);
  background: var(--panel);
}
.nz-kv-panel[data-state='pass'] {
  border-color: var(--hue-green);
}
.nz-kv-panel[data-state='a4'],
.nz-kv-panel[data-state='fail'] {
  border-color: var(--red);
}
.nz-kv-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.9;
}
.nz-kv-score__num {
  font-size: 76px;
  font-variant-numeric: tabular-nums;
}
.nz-kv-score__of {
  font-size: 28px;
  color: var(--text-dim);
}
.nz-kv-bar {
  position: relative;
  padding-bottom: 20px;
}
.nz-kv-cells {
  display: grid;
  grid-template-columns: repeat(25, 1fr);
  gap: 2px;
}
.nz-kv-cell {
  height: 18px;
  background: var(--rule);
  transition: background-color var(--dur-chip) ease;
}
.nz-kv-cell[data-s='a'] { background: var(--s-a); }
.nz-kv-cell[data-s='b1'] { background: var(--s-b1); }
.nz-kv-cell[data-s='b2'] { background: var(--s-b2); }
.nz-kv-cell[data-s='c'] { background: var(--s-c); }
.nz-kv-threshold {
  position: absolute;
  top: -5px;
  bottom: 0;
  left: var(--at);
  width: 0;
  border-left: 2px solid var(--paper);
  transform: translateX(-1px);
}
.nz-kv-threshold span {
  position: absolute;
  bottom: -2px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper);
}
.nz-kv-verdict__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
}
.nz-kv-panel[data-state='pass'] .nz-kv-verdict__head i {
  color: var(--hue-green);
}
.nz-kv-panel[data-state='fail'] .nz-kv-verdict__head i,
.nz-kv-panel[data-state='a4'] .nz-kv-verdict__head i {
  color: var(--red-text);
}
.nz-kv-reasons {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--paper-dim);
}
.nz-kv-panel[data-state='a4'] .nz-kv-reasons li:first-child {
  padding: 8px 10px;
  border: 1.5px solid var(--red);
  background: var(--red-soft);
  color: var(--paper);
}
.nz-kv-break {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}
.nz-kv-break__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: var(--s-3);
}
.nz-kv-break dt {
  font-size: 13px;
  color: var(--paper-dim);
}
.nz-kv-break dd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.nz-kv-break dd b {
  min-width: 34px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}
.nz-kv-break__bar {
  flex: 1 1 auto;
  height: 5px;
  background: var(--rule);
}
.nz-kv-break__bar span {
  display: block;
  height: 100%;
  transition: width var(--dur-panel) var(--ease-panel);
}
.nz-kv-break__row[data-s='a'] .nz-kv-break__bar span { background: var(--s-a); }
.nz-kv-break__row[data-s='b1'] .nz-kv-break__bar span { background: var(--s-b1); }
.nz-kv-break__row[data-s='b2'] .nz-kv-break__bar span { background: var(--s-b2); }
.nz-kv-break__row[data-s='c'] .nz-kv-break__bar span { background: var(--s-c); }
.nz-kv-rule {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.nz-kv-rule .nz-cites {
  display: inline-flex;
}
.nz-kv-reset {
  align-self: flex-start;
}
.nz-kv-mini {
  display: none;
}
@media (max-width: 979.98px) {
  /* Below the two-column layout, a slim score bar follows the form. */
  .nz-kv-mini {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(60px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: var(--s-2);
    padding: 10px 14px;
    border: 1.5px solid var(--rule);
    background: var(--panel);
    box-shadow: var(--shadow-sheet);
  }
  .nz-kv-mini[data-state='pass'] {
    border-color: var(--hue-green);
  }
  .nz-kv-mini[data-state='fail'],
  .nz-kv-mini[data-state='a4'] {
    border-color: var(--red);
  }
  .nz-kv-mini__num {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .nz-kv-mini__bar {
    position: relative;
    height: 6px;
    background: var(--rule);
  }
  .nz-kv-mini__bar::after {
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 48%;
    border-left: 2px solid var(--paper);
  }
  .nz-kv-mini__fill {
    display: block;
    height: 100%;
    background: var(--paper-dim);
  }
  .nz-kv-mini[data-state='pass'] .nz-kv-mini__fill {
    background: var(--hue-green);
  }
  .nz-kv-mini__state {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--paper-dim);
  }
}
@media (max-width: 819.98px) {
  .nz-kv-mini {
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px);
  }
}

/* ── Generatori ────────────────────────────────────────────────────────── */
.nz-gen-index ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--paper);
}
.nz-gen-index__btn {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: 'n icon' 'title title' 'desc desc';
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding: 16px 18px 18px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-hover) ease;
}
.nz-gen-index li + li .nz-gen-index__btn {
  padding-left: 18px;
  border-left: 1px solid var(--rule);
}
.nz-gen-index__n {
  grid-area: n;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--red-text);
}
.nz-gen-index__icon {
  grid-area: icon;
  justify-self: end;
  color: var(--text-dim);
}
.nz-gen-index__title {
  grid-area: title;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.nz-gen-index__desc {
  grid-area: desc;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-dim);
}
.nz-gen-index__btn:hover .nz-gen-index__title {
  color: var(--red-text);
}
.nz-gen-index__btn:hover .nz-gen-index__icon {
  color: var(--paper);
}
@media (max-width: 559.98px) {
  .nz-gen-index li + li .nz-gen-index__btn {
    padding-left: 0;
    border-left: 0;
  }
  .nz-gen-index__btn {
    padding: 14px 0;
  }
}

.nz-gen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  min-width: 0;
}
@media (min-width: 980px) {
  .nz-gen-grid {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: var(--s-7);
    align-items: start;
  }
  .nz-gen-grid--d1 {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  }
}
.nz-gen-fields {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-width: 0;
}
.nz-gen-subhead {
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
}
.nz-gen-subhead:first-child {
  margin-top: 0;
}
.nz-gen-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: var(--s-4);
}
.nz-gen-fields input[type='date'] {
  font-family: var(--font-mono);
}
.nz-gen-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.nz-gen-warn {
  color: var(--paper);
}
.nz-gen-warn::before {
  content: '\26A0\FE0E  ';
  content: '\26A0\FE0E  ' / '';
  color: var(--hue-amber);
}
.nz-gen-result {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-width: 0;
}
.nz-gen-resulthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nz-gen-out {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--red);
  background: var(--code-bg);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 520px;
  overflow: auto;
}
.nz-gen-subject {
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: var(--code-bg);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.nz-gen-actions {
  gap: var(--s-2);
}
.nz-gen-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}
.nz-gen-note .nz-cites {
  display: inline-flex;
}
.nz-gen-docs {
  display: grid;
  gap: var(--s-4);
  min-width: 0;
}
.nz-gen-doc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--rule);
  background: var(--panel);
}
.nz-gen-doc__n {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-text);
}
.nz-gen-doc__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.nz-gen-doc__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--paper-dim);
}
.nz-gen-doc__actions {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.nz-gen-docmsg {
  min-height: 1.4em;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
}
.nz-gen-docmsg.is-error {
  color: var(--red-text);
}
.nz-gen-attachwrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nz-gen-attach {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  counter-reset: att;
}
.nz-gen-attach li {
  display: grid;
  grid-template-columns: 22px 22px minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.4;
  counter-increment: att;
}
.nz-gen-attach li::before {
  content: counter(att) '.';
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.nz-gen-attach__mark {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
}
.nz-gen-attach li.is-done .nz-gen-attach__mark {
  color: var(--hue-green);
}
.nz-gen-attach li.is-missing .nz-gen-attach__mark {
  color: var(--on-hue);
  background: var(--hue-amber);
}
.nz-gen-attach li.is-missing {
  color: var(--paper);
}
.nz-gen-attach li.is-done {
  color: var(--paper-dim);
}
.nz-gen-missing {
  font-size: 13px;
  line-height: 1.45;
  color: var(--paper-dim);
}
.nz-gen-missing a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.nz-gen-missing a:hover {
  color: var(--red-text);
}
.nz-gen-qes .nz-callout__body .nz-cites {
  display: inline-flex;
}
.nz-gen-nopool a {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nz-gen-nopool {
  font-size: 14px;
  line-height: 1.5;
}
.nz-gen-nopool .nz-callout__body,
.nz-gen-poolinfo {
  display: grid;
  gap: var(--s-2);
  min-width: 0;
}
.nz-gen-stale {
  color: var(--paper);
}
.nz-gen-stale .fa-triangle-exclamation {
  color: var(--hue-amber);
}
.nz-gen-stale a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nz-gen-d1note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border: 1.5px solid var(--hue-amber);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--paper-dim);
}
.nz-gen-d1note i {
  margin-top: 3px;
  color: var(--hue-amber);
}
.nz-gen-d1note b {
  color: var(--paper);
}
.nz-gen-d1note a {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nz-gen-d1note .nz-cites {
  display: inline-flex;
}
.nz-gen-mailhint {
  padding-left: 12px;
  border-left: 2px solid var(--hue-amber);
}

/* Dodatak I manual rows */
.nz-d1-manual {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--rule);
}
.nz-d1-mrows {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: d1;
}
.nz-d1-mrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
  gap: 8px 12px;
  align-items: end;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
}
.nz-d1-mtype {
  grid-column: 1 / 3;
}
.nz-d1-mrow .nz-field:nth-child(4) {
  grid-column: 1 / 3;
}
.nz-d1-del {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
}
.nz-d1-mrow input[type='date'],
.nz-d1-mrow .is-num {
  font-family: var(--font-mono);
}

/* The Dodatak I sheet: paper-like, printable */
.nz-d1 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 30px 26px;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--paper);
}
.nz-d1-draft {
  align-self: flex-start;
  padding: 3px 8px;
  border: 1px dashed var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nz-d1-kicker {
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}
.nz-d1-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}
.nz-d1-head {
  display: grid;
  gap: 8px;
  margin: 6px 0 4px;
}
.nz-d1-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}
/* OIB and matični broj on one row: dt dd dt dd, the second pair set apart. */
.nz-d1-head__pair dd:not(:last-child) {
  margin-right: 18px;
}
.nz-d1-head dt {
  font-size: 13.5px;
  color: var(--paper-dim);
}
.nz-d1-head dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.nz-d1-wrap {
  background: transparent;
}
.nz-d1-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.nz-d1-table th,
.nz-d1-table td {
  padding: 7px 10px;
  border: 1px solid var(--paper-dim);
  vertical-align: top;
  text-align: left;
}
.nz-d1-table thead th {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nz-d1-table .is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nz-d1-kind {
  width: 34%;
}
.nz-d1-kind__l,
.nz-d1-kind__s,
.nz-d1-kind__c {
  display: block;
}
.nz-d1-kind__l {
  font-weight: 700;
  font-size: 12.5px;
}
.nz-d1-kind__s {
  font-size: 12px;
  font-weight: 600;
}
.nz-d1-kind__c {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.nz-d1-period {
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: nowrap;
}
.nz-d1-table tfoot th,
.nz-d1-table tfoot td {
  font-weight: 800;
  border-top: 2px solid var(--paper);
}
.nz-d1-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 28px;
  margin-top: 10px;
  font-size: 13.5px;
}
.nz-d1-foot u {
  text-decoration-color: var(--paper-dim);
  text-underline-offset: 3px;
}
.nz-d1-sign {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
}
.nz-d1-line {
  display: inline-block;
  width: 150px;
  border-bottom: 1px solid var(--paper-dim);
}
@media (max-width: 559.98px) {
  .nz-d1 {
    padding: 20px 16px;
  }
}

/* ── Touch: 44px targets in mobile mode ──────────────────────────────── */
@media (max-width: 819.98px) {
  /* Chips at the end of the intro and the section buttons under them: keep
     their invisible hit margins (8 + 9px) from overlapping. */
  .nz-tool__sechead {
    row-gap: 20px;
  }
  .nz-seg__label {
    min-height: 44px;
  }
  .nz-kv-workseg .nz-seg__label,
  .nz-kv-modeseg .nz-seg__label {
    min-height: 44px;
  }
  .nz-dk-notes summary {
    min-height: 44px;
  }
  .nz-tool .nz-btn--sm,
  .nz-tool .nz-btn--ghost {
    min-height: 44px;
  }
  .nz-rk-form input,
  .nz-gen-fields input,
  .nz-gen-fields select,
  .nz-d1-mrow input,
  .nz-d1-mrow select,
  .nz-kv-inputs input {
    min-height: 44px;
    font-size: 16px;
  }
  .nz-dk-valid {
    grid-template-columns: minmax(0, 1fr);
  }
  .nz-dk-valid__field input {
    min-height: 44px;
  }
  .nz-rk-series {
    min-height: 44px;
    align-items: center;
  }
  .nz-rk-series input {
    width: 22px;
    height: 22px;
  }
}
@media (max-width: 419.98px) {
  .nz-seg__opts {
    display: flex;
  }
  .nz-seg__label {
    padding-inline: 10px;
    white-space: normal;
    text-align: center;
  }
  .nz-kv-q {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .nz-kv-q__pts {
    grid-column: 2;
    justify-self: start;
    order: 3;
  }
  .nz-kv-score__num {
    font-size: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nz-progress__fill,
  .nz-kv-break__bar span,
  .nz-kv-cell,
  .nz-dk-box::after,
  .nz-kv-q__box::after {
    transition: none;
  }
}

/* ── Print ──────────────────────────────────────────────────────────── */
@media print {
  html.nz-print-scoped [data-print-hide] {
    display: none !important;
  }
  html.nz-print-scoped .nz-footer {
    display: none !important;
  }
  .nz-tool__split,
  .nz-gen-grid {
    display: block !important;
  }
  .nz-tool__sticky {
    position: static !important;
  }
  .nz-kv-mini,
  .nz-dk-notes,
  .nz-dk-valid input,
  .nz-gen-index {
    display: none !important;
  }
  /* Checklist: boxes print as ☐ / ☑, items stay together. */
  .nz-dk-item {
    grid-template-columns: 22px minmax(0, 1fr) !important;
    padding: 6pt 0 !important;
    break-inside: avoid;
    background: none !important;
  }
  .nz-dk-check {
    width: 22px;
    height: 22px;
    margin: 0;
  }
  .nz-dk-box {
    width: 13px;
    height: 13px;
    margin-top: 3px;
    border: 1px solid #1d1614;
  }
  .nz-dk-cb:checked + .nz-dk-box {
    background: #ffffff;
    border-color: #1d1614;
  }
  .nz-dk-box::after {
    top: 0;
    left: 3px;
    width: 4px;
    height: 8px;
    border-color: #1d1614;
  }
  .nz-dk-item.is-done .nz-dk-title {
    text-decoration: none;
    color: #1d1614;
  }
  .nz-dk-title {
    font-size: 11.5pt;
  }
  .nz-dk-hint,
  .nz-dk-lead,
  .nz-dk-wording {
    font-size: 9.5pt;
  }
  .nz-dk-printtitle {
    font-family: var(--font-display);
    font-size: 16pt;
    font-weight: 800;
    margin-bottom: 6pt;
  }
  .nz-dk-printnote {
    font-size: 9.5pt;
    font-style: italic;
  }
  .nz-dk-printnote:empty {
    display: none !important;
  }
  /* Dodatak I prints as a clean form. */
  .nz-d1 {
    border: 0 !important;
    padding: 0 !important;
  }
  .nz-d1-draft {
    border-color: #6b5d53;
  }
  .nz-d1-table {
    min-width: 0;
    font-size: 10pt;
  }
  .nz-d1-table th,
  .nz-d1-table td {
    border-color: #1d1614;
  }
  .nz-cite {
    border-color: #bfb4a3 !important;
  }
}
