/*
 * 50/30/20 kalkulators (2026-10-20). Pamats — calc.css; šeit tikai sava daļa,
 * klases ar "nx-". Ārpus normas nekad tikai krāsa: vārds šūnā + bultiņa.
 */
.nx-calc { grid-template-columns: 340px minmax(0, 1fr); }
.nx-act { border: 0; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); min-width: 0; }
.nx-act legend { font-size: 13px; color: var(--text-2); font-weight: 600; letter-spacing: .02em; padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.nx-act legend + * { clear: both; }
.nx-act .muted { display: block; margin-bottom: 10px; }
.nx-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nx-g .cx-lbl i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.nx-g .cx-lbl { letter-spacing: .06em; }
.nx-row2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.nx-mort { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-2); cursor: pointer; min-height: 32px; }
.nx-mort input { width: 18px; height: 18px; accent-color: var(--accent); }
.nx-clear { background: transparent; border: 0; color: var(--text-3); font: 600 13px/1.2 inherit; font-family: inherit;
  cursor: pointer; padding: 8px 0; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; }
.nx-clear:hover { color: var(--text); }
.nx-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nx-kpis { grid-template-columns: 1fr 1fr 1fr; }
.nx-kpis .cx-kpi { border-top: 3px solid var(--c); }
.nx-kpis .cx-kpi b { color: var(--text); }

.nx-chart { margin-top: 18px; }
.nx-chart svg { width: 100%; height: 132px; display: block; overflow: visible; }
.nx-lbl { fill: var(--text-2); font-size: 12px; font-weight: 700; letter-spacing: .04em; font-family: inherit; }
.nx-track { fill: var(--surface-2); }
.nx-empty { fill: none; stroke: var(--line-strong); stroke-dasharray: 5 4; }
.nx-hint { fill: var(--text-3); font-size: 12px; font-family: inherit; }
.nx-seg { fill: var(--c); }
.nx-rest { fill: color-mix(in srgb, var(--text-3) 30%, transparent); }
.nx-in { fill: #0b0d12; font-size: 12px; font-weight: 700; font-family: inherit; font-variant-numeric: tabular-nums; }
.nx-rest + .nx-in { fill: var(--text); }

.nx-tbl { margin-top: 14px; }
.nx-tbl table { font-size: 14px; }
.nx-tbl th, .nx-tbl td { vertical-align: top; }
.nx-tbl thead th { white-space: nowrap; }
.nx-tbl tbody th { text-transform: none; font-size: 12px; letter-spacing: .06em; color: var(--text); white-space: nowrap; }
.nx-tbl tbody th i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.nx-tbl td b { display: block; font-weight: 700; color: var(--text); white-space: nowrap; }
.nx-tbl td b i { font-style: normal; color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.nx-tbl td small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }
.nx-tbl td.nx-none { color: var(--text-3); }
.nx-you.ok small::before { content: "✓ "; color: var(--state-good); font-weight: 700; }
.nx-you.out small::before { content: "↗ "; color: var(--accent); font-weight: 700; }
.nx-you.out small { color: var(--text-2); }
.nx-you small a { color: var(--text-2); }
.nx-left th { font-size: 12px; letter-spacing: .06em; color: var(--text-2) !important; }
.nx-left th, .nx-left td { border-bottom: 0; }
.nx-tip { margin-top: 14px; }

.nx-art-tbl td b { font-weight: 600; }

@media (max-width: 900px) {
  .nx-calc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  /* Telefonā: KPI rindās (grupa pa kreisi, summa pa labi), tabula — kartītes ar kolonnas vārdu. */
  .nx-kpis { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .nx-kpis .cx-kpi { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px;
    border-top: 0; border-left: 3px solid var(--c); }
  .nx-kpis .cx-kpi b { margin: 0; font-size: 18px; }
  .nx-kpis .cx-kpi small { font-size: 10.5px; letter-spacing: .06em; }
  .nx-tbl thead { display: none; }
  .nx-tbl table, .nx-tbl tbody { display: block; }
  .nx-tbl tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nx-tbl tbody th, .nx-tbl tbody td { border: 0; padding: 0; text-align: left; }
  .nx-tbl tbody th { grid-column: 1 / -1; font-size: 11.5px; }
  .nx-tbl td::before { content: attr(data-l); display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-3); font-weight: 700; margin-bottom: 3px; }
  .nx-tbl td b { font-size: 14px; white-space: normal; }
  .nx-tbl td b i { display: block; font-size: 12px; }
  .nx-tbl td small { font-size: 11.5px; }
  .nx-tbl tbody tr.nx-left { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 0; }
  .nx-left td.nx-e { display: none; }
  .nx-left td::before { content: none; }
  .nx-left td b { text-align: right; }
  .nx-left td b i { display: inline; }
}
