/* Den klickbara demon i "Så ser det ut" (2026-11-10). Samma färger och former som appen (web/src/ui/numera.css),
   men allt ligger under .nm så att inget läcker ut på säljsidan. Bara ljust läge, som resten av sidan.
   .nm--desk är datorn (sidomeny till vänster), .nm--phone är mobilen (menyrad överst). Kolumnerna rättar sig efter
   demons egen bredd (container queries), inte efter fönstrets. */

/* ───── Scenen: datorn och telefonen bredvid varandra. Under 1100 px bara datorn, under 760 px bara telefonen. */
.nm-stage { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: clamp(18px, 2.4vw, 30px); align-items: end; }
.nm-deskframe { margin: 0; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #F6F3EC; box-shadow: 0 40px 80px -50px rgba(27, 26, 23, .45); height: clamp(580px, 58vw, 680px); }
.nm-deskframe > .nm, .nm-deskframe > img { height: 100%; }
.nm-deskframe > img { display: block; width: 100%; object-fit: cover; object-position: top left; }
.nm-phoneframe { margin: 0; }
.nm-phoneframe .phone-screen { height: 560px; padding-top: 30px; background: #17282A; }
.nm-phoneframe .phone-screen > .nm { height: 100%; }
.nm-phoneframe .phone-island { top: 17px; }
.nm-stage-hint { display: flex; align-items: baseline; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--green); }
.nm-stage-hint i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pale-line); box-shadow: 0 0 0 0 rgba(127, 192, 184, .7); animation: nm-pulse 2.2s infinite; }
@keyframes nm-pulse { 70% { box-shadow: 0 0 0 9px rgba(127, 192, 184, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 192, 184, 0); } }
@media (max-width: 1100px) { .nm-stage { grid-template-columns: minmax(0, 1fr); } .nm-phoneframe { display: none; } }
@media (max-width: 760px) {
  .nm-deskframe { display: none; }
  .nm-phoneframe { display: block; width: min(100%, 400px); margin: 0 auto; }
  .nm-phoneframe .phone-screen { height: min(640px, 76vh); height: min(640px, 76svh); }
}
@media (prefers-reduced-motion: reduce) { .nm-stage-hint i { animation: none; } }

/* ───── Grunden */
.nm {
  --paper: #F6F3EC; --sheet: #FCFAF5; --well: #EFEBE1; --ink: #1B1A17; --ink2: #514E47; --ink3: #6E6B65; --rule: #DDD8CC;
  --signal: #C43C17; --signal-wash: #F5E4DB; --positive: #2E6A44; --positive-wash: #E3EDE5;
  --accent: #A8D8D1; --accent-deep: #93CDC5; --accent-ink: #357A77; --accent-wash: #E3F2EF; --accent-edge: #7FC0B8;
  --night: #17282A; --night-raised: #1E3234; --night-ink: #EDF3F2; --night-ink2: #B3C6C5;
  --nm-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --nm-serif: "New York", ui-serif, "Iowan Old Style", Charter, Georgia, serif;
  --nm-figure: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --nm-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 8px 18px -6px rgb(27 26 23 / .08), 0 1px 2px rgb(27 26 23 / .04);
  position: relative; display: grid; grid-template-columns: 212px minmax(0, 1fr); overflow: hidden; isolation: isolate;
  background: var(--paper); color: var(--ink); font: 13px/1.45 var(--nm-sans);
  font-variant-numeric: tabular-nums; text-align: left; -webkit-font-smoothing: antialiased;
}
:where(.nm) *, :where(.nm) *::before, :where(.nm) *::after { box-sizing: border-box; }
:where(.nm) button, :where(.nm) input, :where(.nm) select { font: inherit; color: inherit; margin: 0; }
:where(.nm) button { cursor: pointer; }
:where(.nm) :is(h3, h4, p, dl, dd, ol, figure) { margin: 0; padding: 0; }
:where(.nm) small { font-size: inherit; }
.nm :focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.nm [hidden] { display: none; }
.nm--phone { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); font-size: 13.5px; }
@media (pointer: coarse) { .nm input, .nm select { font-size: 16px; } }

.nm-hue-moss { --hue: #4C6B48; --hue-wash: #E4EAE0; --hue-edge: #A9BCA3; } .nm-hue-slate { --hue: #47617D; --hue-wash: #E0E6EC; --hue-edge: #A4B3C4; }
.nm-hue-ochre { --hue: #8A6A22; --hue-wash: #F0E8D3; --hue-edge: #CDBB8A; } .nm-hue-plum { --hue: #6E4A6B; --hue-wash: #EBE1EA; --hue-edge: #C2A8C0; }
.nm-hue-teal { --hue: #3B6A6D; --hue-wash: #DEE9E9; --hue-edge: #A0BFC0; } .nm-hue-clay { --hue: #9A5A3F; --hue-wash: #F1E3DB; --hue-edge: #D4B2A0; }
.nm-hue-stone { --hue: #6B6760; --hue-wash: #E8E6E0; --hue-edge: #C5C1B8; } .nm-hue-rose { --hue: #8C4F5B; --hue-wash: #F0E2E4; --hue-edge: #D1AEB4; }
.nm-hue-ink { --hue: var(--ink); --hue-wash: var(--well); --hue-edge: var(--rule); }

/* ───── Sidomenyn */
.nm-side { background: var(--night); color: var(--night-ink); padding: 16px 8px 10px; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #33494b transparent; }
.nm-brand { display: grid; padding: 0 9px 12px; }
.nm-brand i { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); margin-bottom: 7px; }
.nm-brand b { font: 500 17px/1 var(--nm-serif); }
.nm-brand small { font: 600 9.5px/1.6 var(--nm-sans); font-variant: all-small-caps; letter-spacing: .05em; color: var(--night-ink2); margin-top: 4px; }
.nm-side nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.nm-group { font: 600 9.5px/1 var(--nm-sans); font-variant: all-small-caps; letter-spacing: .06em; color: var(--night-ink2); opacity: .8; padding: 11px 9px 5px; }
.nm-nav { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border: 0; border-radius: 7px; background: none; color: var(--night-ink2); text-align: left; font-size: 12.5px; transition: background .15s, color .15s; }
.nm-nav span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-nav:hover { background: rgb(255 255 255 / .06); color: var(--night-ink); }
.nm-nav[aria-current="page"] { background: rgb(255 255 255 / .12); color: var(--night-ink); font-weight: 600; }
.nm-ic { flex: none; opacity: .9; }
.nm-lamp-ink .nm-ic { color: var(--accent); } .nm-lamp-slate .nm-ic { color: #93ADC9; } .nm-lamp-ochre .nm-ic { color: #CFAF5E; } .nm-lamp-teal .nm-ic { color: #8DBDC0; }
.nm-lamp-rose .nm-ic { color: #D39AA5; } .nm-lamp-plum .nm-ic { color: #B995B6; } .nm-lamp-moss .nm-ic { color: #9DBB96; } .nm-lamp-clay .nm-ic { color: #D69A7E; } .nm-lamp-stone .nm-ic { color: #A19D95; }
.nm-count { margin-left: auto; font: 600 10px/16px var(--nm-mono); font-style: normal; color: var(--night); background: var(--accent); border-radius: 999px; padding: 0 6px; min-width: 18px; text-align: center; }
.nm-sidefoot { margin-top: auto; padding: 10px 9px 0; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--night-ink2); border-top: 1px solid rgb(255 255 255 / .12); }
.nm-sidefoot span { display: flex; align-items: center; gap: 6px; } .nm-sidefoot i { width: 6px; height: 6px; background: var(--accent); }
.nm-sidefoot button { background: none; border: 0; padding: 4px 0; color: var(--night-ink2); text-decoration: underline; text-underline-offset: 3px; font-size: 11px; }
.nm-sidefoot button:hover { color: var(--night-ink); }
.nm-side nav + .nm-sidefoot { margin-top: 12px; }

/* Mobilen: menyrad och meny som täcker skärmen */
.nm-mbar { display: flex; align-items: center; gap: 10px; background: var(--night); color: var(--night-ink); padding: 6px 12px 9px; }
.nm-mbar b { font: 500 16px var(--nm-serif); }
.nm-burger { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--night-ink2); background: none; display: grid; place-content: center; gap: 3px; padding: 0; }
.nm-burger span { display: block; width: 13px; height: 1.5px; background: var(--night-ink); }
.nm-drawer { position: absolute; inset: 49px 0 0 0; z-index: 6; padding: 6px 12px 14px; animation: nm-fade .18s ease-out; }
.nm-drawer .nm-brand { display: none; }
.nm-drawer .nm-nav { padding: 8px 10px; font-size: 14.5px; }
.nm--phone .nm-main { grid-row: 2; }

/* ───── Sidan */
.nm-main { overflow-y: auto; min-height: 0; min-width: 0; container-type: inline-size; scrollbar-width: thin; scrollbar-color: #cfc9bb transparent; }
.nm-main:focus { outline: none; }
.nm-page { padding: 20px 20px 36px; display: grid; gap: 14px; align-content: start; }
.nm--phone .nm-page { padding: 14px 12px 28px; gap: 12px; }
.nm-enter { animation: nm-rise .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes nm-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes nm-fade { from { opacity: 0; } }

.nm-head { display: grid; gap: 0; }
.nm-headrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.nm-kicker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font: 600 10.5px/1.3 var(--nm-sans); font-variant: all-small-caps; letter-spacing: .05em; color: var(--hue, var(--ink3)); }
.nm-head .nm-kicker i { width: 6px; height: 6px; background: var(--hue); }
.nm-hue-ink .nm-kicker i { display: none; }
.nm-head h3, .nm-vhead h3 { font: 600 25px/1.15 var(--nm-serif); letter-spacing: -.01em; margin: 3px 0 8px; color: var(--ink); }
.nm-headright { display: flex; align-items: center; gap: 12px; margin-bottom: 7px; }
.nm-headrule { height: 1.5px; background: var(--hue, var(--ink)); }
.nm-sub { margin-top: 10px ; color: var(--ink2); max-width: 54em; }
.nm-vhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1.5px solid var(--ink); }
.nm-vhead .nm-kicker { color: var(--ink3); }
.nm-vhead h3 { margin-bottom: 2px; }
.nm-back { justify-self: start; background: none; border: 0; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }

.nm-tabs { display: flex; gap: 0 14px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
.nm-headright .nm-tabs { border: 0; }
.nm-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 0; color: var(--ink2); margin-bottom: -1px; }
.nm-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-color: var(--accent-ink); }
.nm-tabs.inner { margin-bottom: 4px; }

/* Knappar */
.nm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 14px; border: 1px solid rgb(27 26 23 / .45); border-radius: 999px; background: var(--sheet); color: var(--ink); font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.nm-btn:hover { background: var(--well); border-color: var(--ink); }
.nm-btn:active { transform: scale(.96); }
.nm-btn.ink { background: var(--accent); border-color: var(--accent-edge); }
.nm-btn.ink:hover { background: var(--accent-deep); border-color: var(--accent-ink); }
.nm-btn.small { padding: 3px 11px; font-size: 12px; }
.nm-btn.quiet { border-color: transparent; background: none; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.nm-btn.ghost { background: none; color: var(--night-ink); border-color: var(--night-ink2); }
.nm-btn.round { width: 30px; height: 30px; padding: 0; font-size: 16px; }
.nm-btn:disabled { opacity: .35; cursor: default; }
.nm-btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nm-btnrow.end { justify-content: flex-end; }
.nm-link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; color: inherit; font-size: 12px; }
.nm-more { text-align: center; padding-top: 10px; }
.nm-hint { color: var(--ink3); font-size: 12px; }
.nm-btnrow .nm-hint { flex: 1 1 220px; }
.nm-pager { display: flex; align-items: center; gap: 10px; }

/* Etiketter */
.nm-tag { display: inline-flex; align-items: center; font: 600 10px/1.5 var(--nm-sans); font-variant: all-small-caps; letter-spacing: .05em; padding: 0 7px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink2); white-space: nowrap; flex: none; }
.nm-tag.attention { color: var(--signal); border-color: var(--signal); background: var(--signal-wash); }
.nm-tag.done { color: var(--positive); border-color: var(--positive); background: var(--positive-wash); }
.nm-tag.hue { color: var(--accent-ink); border-color: var(--accent-edge); background: var(--accent-wash); }
.nm-tag.solid { color: var(--sheet); border-color: var(--hue); background: var(--hue); }

/* Kort, paneler, rader */
.nm-card { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--hue); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow); min-width: 0; }
.nm-card.nm-hue-ink { border-top: 1px solid var(--rule); }
.nm-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--hue-edge, var(--rule)); }
.nm-sechead h4 { font: 600 16px/1.25 var(--nm-serif); color: var(--ink); }
.nm-note { font-size: 11.5px; color: var(--hue, var(--ink3)); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nm-hue-ink .nm-note { color: var(--ink2); }
.nm-panel { background: var(--hue-wash); border: 1px solid color-mix(in srgb, var(--hue-edge) 70%, transparent); border-radius: 12px; padding: 15px 16px; display: grid; gap: 5px; align-content: start; justify-items: start; text-align: left; color: var(--ink); min-width: 0; }
:where(.nm-panel) p { color: var(--ink2); }
.nm-panel.nm-click { cursor: pointer; transition: transform .2s, box-shadow .2s; }
.nm-panel.nm-click:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.nm-figure { font: 600 36px/1 var(--nm-figure); font-stretch: condensed; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.nm-figure small { font-size: 13px; font-weight: 500; margin-left: 4px; color: var(--ink2); }
.nm-panel.nounit .nm-figure > small:last-child { display: none; }
.nm-vhead .nm-figure { font-size: 30px; padding-bottom: 4px; }
.nm-pline { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; color: var(--ink); }
.nm-pline i { width: 6px; height: 6px; background: var(--hue); flex: none; }
.nm-pline.hot { color: var(--signal); } .nm-pline.hot i { background: var(--signal); }
.nm-grid2, .nm-grid3 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nm-grid2.wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.nm-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nm-grid3 .nm-figure { font-size: 27px; }
@container (max-width: 560px) { .nm-grid2, .nm-grid2.wide, .nm-grid3 { grid-template-columns: minmax(0, 1fr); gap: 12px; } .nm-grid3 .nm-figure { font-size: 26px; } .nm-grid3 .nm-panel { padding: 11px 14px; gap: 3px; } }

.nm-ledger { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.nm-ledger:last-child { border-bottom: 0; padding-bottom: 2px; }
.nm-ledger > i { width: 7px; height: 7px; background: var(--hue); align-self: center; flex: none; }
.nm-lname { display: grid; min-width: 0; flex: 0 1 auto; } .nm-lname b { font-weight: 500; font-size: 14px; } .nm-lname small { color: var(--ink3); font-size: 11.5px; }
.nm-leader { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--ink3); opacity: .6; transform: translateY(-4px); }
.nm-amount { font: 500 16px var(--nm-figure); white-space: nowrap; }

.nm-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left; border-radius: 0; transition: background .12s; }
button.nm-row:hover { background: var(--well); border-radius: 8px; }
.nm-row:last-child, .nm-row:has(+ .nm-more), .nm-row:has(+ .nm-hint) { border-bottom: 0; }
.nm-row.tight { padding: 5px 6px; }
.nm-code { font: 11.5px var(--nm-mono); color: var(--ink2); flex: none; min-width: 38px; }
.nm-code.wide { min-width: 88px; }
.nm-rmain { display: grid; min-width: 0; flex: 1; }
.nm-rmain b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .nm-rmain b.plain { font-weight: 400; white-space: normal; }
.nm-rmain small { color: var(--ink3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-ramount { font: 500 14.5px var(--nm-figure); white-space: nowrap; margin-left: auto; flex: none; }
.nm-ramount.pos { color: var(--positive); }
.nm-sumrow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 6px 2px; border-top: 1.5px solid var(--ink); margin-top: -1px; font-family: var(--nm-serif); font-size: 14px; }
.nm-sumrow + .nm-row { margin-top: 6px; }
@container (max-width: 460px) { .nm-row.static:has(.nm-btn) { flex-wrap: wrap; } .nm-row.static .nm-btn { margin-left: 48px; } }

/* Översikten */
.nm-drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--sheet); border: 1.5px dashed var(--accent-edge); border-radius: 12px; padding: 13px 15px; }
.nm-drop > div:first-of-type { flex: 1 1 200px; display: grid; } .nm-drop b { font-size: 14px; } .nm-drop small { color: var(--ink2); }
.nm-plus { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; font-size: 20px; font-weight: 500; flex: none; }
.nm-todo { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left; }
.nm-todo:last-child { border-bottom: 0; } .nm-todo:hover { background: var(--well); border-radius: 8px; }
.nm-todo > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; } .nm-todo small { color: var(--ink2); font-size: 12px; }
.nm-n { font: 600 11px/20px var(--nm-mono); min-width: 24px; text-align: center; border-radius: 6px; background: var(--well); color: var(--ink2); flex: none; }
.nm-todo.hot .nm-n { background: var(--signal-wash); color: var(--signal); }
.nm-arrow { color: var(--ink3); }
.nm-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 10px; color: var(--ink2); }
.nm-empty b { font: 600 16px var(--nm-serif); color: var(--ink); } .nm-empty small { max-width: 34em; } .nm-empty .nm-btn { margin-top: 6px; }
.nm-tick { width: 36px; height: 36px; border-radius: 50%; background: var(--positive-wash); color: var(--positive); display: grid; place-items: center; font-size: 18px; font-weight: 700; animation: nm-pop .4s cubic-bezier(.34, 1.5, .64, 1) both; }
@keyframes nm-pop { from { transform: scale(.4); opacity: 0; } }
.nm-chart { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; padding-top: 12px; }
.nm-col { display: grid; gap: 4px; justify-items: center; } .nm-col small { font-size: 10.5px; color: var(--ink3); }
.nm-bars { height: 96px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--rule); }
.nm-bars span { width: 42%; max-width: 15px; border-radius: 3px 3px 0 0; transform-origin: bottom; }
.nm-enter .nm-bars span { animation: nm-grow .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes nm-grow { from { transform: scaleY(0); } }
.nm-bars .in, .nm-key .in { background: #4C6B48; } .nm-bars .out, .nm-key .out { background: #D4B2A0; }
.nm-key { display: inline-flex; align-items: center; gap: 5px; color: var(--ink2); } .nm-key i { width: 8px; height: 8px; border-radius: 2px; } .nm-key .out { margin-left: 8px; }

/* Verifikation, utkast */
.nm-meta { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 5px 16px; }
.nm-meta dt { color: var(--ink3); } .nm-meta dd { min-width: 0; }
.nm-card .nm-meta { padding-top: 8px; }
.nm-card .nm-meta + .nm-btnrow, .nm-card .nm-meta + .nm-locked { margin-top: 10px; }
[data-live] { display: grid; min-width: 0; }
.nm-locked { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink2); }
.nm-locked i { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); flex: none; }
.nm-locked.hot { color: var(--signal); } .nm-locked.hot i { background: var(--signal); } .nm-locked.wait i { background: #CDBB8A; }
.nm-why { background: var(--accent-wash); border-left: 3px solid var(--accent-edge); border-radius: 10px; padding: 9px 12px; display: grid; gap: 3px; }
.nm-why small { color: var(--ink3); font-size: 11.5px; }
.nm-book { width: 100%; border-collapse: collapse; }
.nm-book th { text-align: left; font: 600 10.5px var(--nm-sans); font-variant: all-small-caps; letter-spacing: .05em; color: var(--ink3); padding: 6px; border-bottom: 1.5px solid var(--ink); }
.nm-book td { padding: 7px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.nm-book td b { font-weight: 500; display: block; } .nm-book td small { color: var(--ink3); font-size: 11.5px; }
.nm-book .nm-num { text-align: right; white-space: nowrap; font-family: var(--nm-figure); font-size: 14px; }
.nm-book th.nm-num { font-size: 10.5px; font-family: inherit; }
.nm-book tfoot td { border-bottom: 0; border-top: 1.5px solid var(--ink); font-weight: 600; }
.nm-ok { color: var(--positive); font-size: 12px; } .nm-ok i { display: inline-block; width: 6px; height: 6px; background: var(--positive); margin-right: 6px; }
.nm-dash { color: var(--rule); }
.nm-book.hb td { font-size: 12px; padding: 5px 6px; } .nm-book.hb .nm-num { font-size: 12.5px; }
.nm-book tr.click { cursor: pointer; } .nm-book tr.click:hover td { background: var(--well); }
@container (max-width: 460px) { .nm-book.hb th:nth-child(2), .nm-book.hb td:nth-child(2), .nm-book.hb th:nth-child(4), .nm-book.hb td:nth-child(4), .nm-book.hb th:nth-child(5), .nm-book.hb td:nth-child(5) { display: none; } }
.nm-review { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
@container (max-width: 520px) { .nm-review { grid-template-columns: minmax(0, 1fr); } .nm-review .nm-receipt { max-width: 230px; margin: 0 auto; } }
.nm-underlag { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; padding-top: 10px; }
.nm-review > .nm-underlag { padding-top: 0; }
.nm-underlag > p { flex: 1 1 180px; color: var(--ink2); }
.nm-receipt { position: relative; width: 200px; max-width: 100%; background: #fff; border: 1px solid var(--rule); padding: 12px 12px 14px; font: 10.5px/1.5 var(--nm-mono); color: #2b2a27; box-shadow: var(--shadow); overflow: hidden; display: grid; gap: 1px; transform: rotate(-.6deg); }
.nm-receipt b { text-align: center; font-size: 11.5px; letter-spacing: .08em; } .nm-receipt > small { text-align: center; color: #807b71; margin-bottom: 6px; font-size: 9.5px; }
.nm-receipt p { display: flex; justify-content: space-between; gap: 8px; } .nm-receipt p span:first-child { min-width: 0; }
.nm-receipt .tot { border-top: 1px dashed #b9b4a8; margin-top: 5px; padding-top: 4px; font-weight: 700; }
.nm-scan { display: none; }
.nm-receipt.reading .nm-scan { display: block; position: absolute; left: 0; right: 0; top: 0; height: 26px; background: linear-gradient(to bottom, rgba(127, 192, 184, 0), rgba(127, 192, 184, .55)); border-bottom: 1.5px solid var(--accent-ink); animation: nm-scan 1.5s ease-in-out infinite alternate; }
@keyframes nm-scan { to { transform: translateY(150px); } }
.nm-form { display: grid; gap: 10px; min-width: 0; }
.nm-form label { display: grid; gap: 3px; min-width: 0; }
.nm-form label > span { font: 600 10.5px var(--nm-sans); font-variant: all-small-caps; letter-spacing: .05em; color: var(--ink3); }
.nm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container (max-width: 380px) { .nm-fields { grid-template-columns: minmax(0, 1fr); } }
.nm input[type=text], .nm input[type=search], .nm select { width: 100%; background: var(--sheet); border: 1px solid var(--rule); border-bottom: 1.5px solid var(--ink2); border-radius: 8px; padding: 6px 9px; min-width: 0; }
.nm input:focus, .nm select:focus { outline: none; border-color: var(--accent-edge); border-bottom-color: var(--accent-ink); }
.nm input[readonly] { background: var(--well); color: var(--ink2); }

/* Faktura */
.nm-paper { background: #fff; border: 1px solid var(--rule); box-shadow: var(--shadow); padding: 26px 28px; display: grid; gap: 16px; font-size: 12px; color: #1b1a17; container-type: inline-size; }
.nm-phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1.5px solid #1b1a17; }
.nm-phead > b { font: 600 17px var(--nm-serif); } .nm-phead div { display: grid; text-align: right; } .nm-phead strong { font: 600 22px/1.1 var(--nm-serif); } .nm-phead small, .nm-pto small { color: #6e6b65; font-size: 11px; white-space: nowrap; }
.nm-pto { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; } .nm-pto > div { display: grid; } .nm-pto b { font-size: 13.5px; }
.nm-pto dl, .nm-psum { display: grid; grid-template-columns: auto auto; gap: 3px 22px; } .nm-pto dt, .nm-psum dt { color: #6e6b65; } .nm-pto dd, .nm-psum dd { text-align: right; }
.nm-paper table { width: 100%; border-collapse: collapse; } .nm-paper th { font: 600 9.5px var(--nm-sans); letter-spacing: .04em; text-transform: uppercase; color: #6e6b65; text-align: right; padding: 5px 0; border-bottom: 1.5px solid #1b1a17; }
.nm-paper td { text-align: right; padding: 7px 0; border-bottom: 1px solid #ddd8cc; white-space: nowrap; } .nm-paper th:first-child, .nm-paper td:first-child { text-align: left; white-space: normal; } .nm-paper th + th, .nm-paper td + td { padding-left: 12px; }
.nm-psum { justify-self: end; min-width: min(230px, 100%); } .nm-psum .tot { font-weight: 700; font-size: 14.5px; border-top: 1.5px solid #1b1a17; padding-top: 5px; margin-top: 3px; }
.nm-ppay { background: #f1efe9; padding: 10px 12px; display: flex; gap: 10px 26px; flex-wrap: wrap; } .nm-ppay span { display: grid; } .nm-ppay small { color: #6e6b65; font-size: 10.5px; }
.nm-paper > p { color: #6e6b65; font-size: 10.5px; }
@container (max-width: 380px) { .nm-paper th:nth-child(2), .nm-paper td:nth-child(2), .nm-paper th:nth-child(3), .nm-paper td:nth-child(3) { display: none; } }
.nm--phone .nm-paper { padding: 16px 14px; }

/* Kunder */
.nm-custgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.nm-custcard { display: grid; gap: 3px; text-align: left; background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid #8A6A22; border-radius: 12px; padding: 13px 14px; box-shadow: var(--shadow); transition: transform .2s; min-width: 0; }
.nm-custcard:hover { transform: translateY(-2px); } .nm-custcard.hot { border-top-color: var(--signal); }
.nm-custcard > b { font: 600 15px/1.25 var(--nm-serif); margin-top: 6px; } .nm-custcard > small { color: var(--ink3); font-size: 11.5px; }
.nm-avatar { width: 34px; height: 34px; border-radius: 50%; background: #F0E8D3; color: #8A6A22; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.nm-avatar.small { width: 28px; height: 28px; font-size: 10.5px; background: #F0E2E4; color: #8C4F5B; }
.nm-kpis { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; margin-top: 9px; font: 500 14px var(--nm-figure); }
.nm-kpis span { display: grid; } .nm-kpis small { font: 600 9.5px var(--nm-sans); font-variant: all-small-caps; letter-spacing: .05em; color: var(--ink3); } .nm-kpis .hot { color: var(--signal); } .nm-kpis .hot small { color: var(--signal); }
.nm-paybar { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: var(--well); margin-top: 8px; } .nm-paybar .p { background: #4C6B48; } .nm-paybar .u { background: #CDBB8A; } .nm-paybar .o { background: var(--signal); }
.nm-custhero { display: flex; align-items: center; gap: 12px; } .nm-custhero .nm-avatar { width: 44px; height: 44px; font-size: 15px; }
.nm-unit { font-size: 13px; }

/* Löner, moms, rapporter */
.nm-slip { margin: 2px 6px 8px 44px; background: var(--well); border-radius: 10px; padding: 9px 12px; display: grid; gap: 3px; animation: nm-fade .2s; }
.nm-slip p { display: flex; justify-content: space-between; gap: 10px; } .nm-slip .tot { font-weight: 700; border-top: 1px solid var(--rule); padding-top: 4px; margin-top: 2px; } .nm-slip .quiet { color: var(--ink3); font-size: 12px; }
.nm-steps { list-style: none; counter-reset: s; display: grid; padding-top: 4px; }
.nm-steps li { counter-increment: s; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.nm-steps li:last-child { border-bottom: 0; }
.nm-steps li::before { content: counter(s); grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--well); display: grid; place-items: center; font: 600 11px var(--nm-mono); color: var(--ink2); }
.nm-steps li.done::before { content: "\2713"; background: var(--positive-wash); color: var(--positive); }
.nm-steps b { grid-column: 2; } .nm-steps small { grid-column: 2; color: var(--ink2); font-size: 12px; } .nm-steps .nm-btn { grid-column: 3; grid-row: 1 / span 2; }
.nm-notice { background: var(--well); border-left: 3px solid var(--ink3); border-radius: 10px; padding: 9px 12px; margin-top: 8px; }
.nm-notice.done { background: var(--positive-wash); border-color: var(--positive); margin-top: 0; }
.nm-plan { height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; margin: 10px 0 6px; } .nm-plan i { display: block; height: 100%; background: #6B6760; border-radius: 3px; }
.nm-mark { width: 8px; height: 8px; background: var(--positive); flex: none; margin: 0 4px; } .nm-mark.hot { background: var(--signal); }
.nm-mailic { width: 28px; height: 28px; border-radius: 8px; background: #DEE9E9; color: #3B6A6D; display: grid; place-items: center; flex: none; }
.nm-searching { display: grid; justify-items: center; gap: 6px; padding: 26px 10px; text-align: center; } .nm-searching small { color: var(--ink2); }
.nm-spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--accent-wash); border-top-color: var(--accent-ink); animation: nm-spin .8s linear infinite; }
@keyframes nm-spin { to { transform: rotate(360deg); } }
.nm-search { max-width: 340px; }

/* Assistenten, lektioner, mörk ruta */
.nm-chat { display: grid; gap: 8px; }
.nm-msg { max-width: 86%; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px 14px 14px 4px; padding: 9px 12px; justify-self: start; box-shadow: var(--shadow); animation: nm-rise .25s both; }
.nm-msg.me { justify-self: end; background: var(--night); color: var(--night-ink); border-color: var(--night); border-radius: 14px 14px 4px 14px; }
.nm-msg.wait { display: flex; gap: 4px; padding: 13px 14px; } .nm-msg.wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); animation: nm-dot 1s infinite; } .nm-msg.wait i:nth-child(2) { animation-delay: .15s; } .nm-msg.wait i:nth-child(3) { animation-delay: .3s; }
@keyframes nm-dot { 30% { transform: translateY(-4px); opacity: .5; } }
.nm-chips { display: flex; flex-wrap: wrap; gap: 6px; } .nm-chips .nm-btn { white-space: normal; text-align: left; border-color: var(--accent-edge); background: var(--accent-wash); }
.nm-ask { display: flex; gap: 8px; margin: 0; } .nm-ask input { flex: 1; }
.nm-lesson { border-top-width: 3px; padding: 0; } .nm-lesson summary { display: flex; align-items: center; gap: 10px; padding: 12px 15px; cursor: pointer; list-style: none; } .nm-lesson summary::-webkit-details-marker { display: none; }
.nm-lesson summary b { font: 600 15px var(--nm-serif); } .nm-lesson p { padding: 0 15px 14px 49px ; color: var(--ink2); }
.nm-night { background: var(--night); color: var(--night-ink); border-radius: 12px; padding: 18px; display: grid; gap: 8px; } .nm-night b { font: 600 17px var(--nm-serif); } .nm-night p { color: var(--night-ink2); max-width: 46em; } .nm-night .nm-btnrow { margin-top: 6px; }

/* Över allt: avläsningen och kvittot på besked */
.nm-overlay { position: absolute; inset: 0; z-index: 8; background: rgb(23 40 42 / .55); display: grid; place-items: center; padding: 16px; animation: nm-fade .2s; }
.nm-reading { background: var(--paper); border-radius: 14px; padding: 22px 26px; display: grid; justify-items: center; gap: 8px; text-align: center; box-shadow: 0 24px 60px rgb(0 0 0 / .25); max-width: 100%; } .nm-reading small { color: var(--ink2); } .nm-reading .nm-receipt { margin-bottom: 8px; }
.nm-toast { position: absolute; left: 50%; bottom: 14px; z-index: 9; transform: translate(-50%, 16px); max-width: calc(100% - 24px); width: max-content; background: var(--night); color: var(--night-ink); padding: 9px 15px; border-radius: 12px; font-weight: 500; box-shadow: 0 12px 30px rgb(0 0 0 / .25); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s cubic-bezier(.2, .8, .2, 1); text-align: center; }
.nm-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { .nm *, .nm *::before, .nm *::after { animation: none; transition: none; } }

/* ───── Kompakt mobil (2026-11-10): samma täta layout som appen på iPhone och webbappens mobilsida.
   Rubriken står i raden överst, huvudsiffrorna står bredvid varandra och raderna är lägre. */
.nm--phone { font-size: 13px; }
.nm--phone .nm-mbar { padding: 4px 12px 7px; gap: 9px; }
.nm--phone .nm-mbar b { font-size: 15px; }
.nm--phone .nm-burger { width: 28px; height: 28px; }
.nm--phone .nm-drawer { inset: 41px 0 0 0; }
.nm--phone .nm-page { padding: 9px 10px 22px; gap: 9px; }
.nm--phone .nm-head h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.nm--phone .nm-sub { display: none; }
.nm--phone .nm-headrow { align-items: center; gap: 4px 8px; }
.nm--phone .nm-headright { margin-bottom: 4px; gap: 8px; }
.nm--phone .nm-headrule { height: 1px; }
.nm--phone .nm-tabs button { padding: 4px 0; }
.nm--phone .nm-btn { padding: 4px 11px; font-size: 12.5px; }
.nm--phone .nm-btn.small { padding: 2px 9px; font-size: 11.5px; }
.nm--phone .nm-btn.round { width: 26px; height: 26px; padding: 0; }
.nm--phone .nm-card { padding: 8px 10px; border-radius: 11px; }
.nm--phone .nm-sechead { padding-bottom: 4px; } .nm--phone .nm-sechead h4 { font-size: 14.5px; }
.nm--phone .nm-grid2:not(.wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.nm--phone .nm-grid2.wide, .nm--phone .nm-grid3 { gap: 9px; }
.nm--phone .nm-panel { padding: 8px 9px 9px; gap: 3px; border-radius: 11px; }
.nm--phone .nm-panel p:not(.nm-figure):not(.nm-pline) { font-size: 11px; line-height: 1.3; color: var(--ink3); }
.nm--phone .nm-panel .nm-pline { font-size: 10.5px; align-items: baseline; color: var(--ink); }
.nm--phone .nm-panel .nm-pline.hot { color: var(--signal); }
.nm--phone .nm-figure { font-size: 25px; } .nm--phone .nm-figure small { font-size: 11px; margin-left: 3px; }
.nm--phone .nm-grid3 .nm-figure { font-size: 22px; } .nm--phone .nm-vhead .nm-figure { font-size: 24px; }
.nm--phone .nm-vhead h3 { font-size: 19px; }
.nm--phone .nm-ledger { padding: 5px 0; } .nm--phone .nm-lname b { font-size: 13px; } .nm--phone .nm-lname small { font-size: 11px; }
.nm--phone .nm-amount { font-size: 14.5px; }
.nm--phone .nm-row { padding: 5px 4px; gap: 8px; } .nm--phone .nm-row.tight { padding: 3px 4px; }
.nm--phone .nm-ramount { font-size: 13.5px; }
.nm--phone .nm-todo { padding: 6px 2px; gap: 8px; }
.nm--phone .nm-todo small { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nm--phone .nm-n { font-size: 10.5px; line-height: 18px; min-width: 22px; }
.nm--phone .nm-drop { flex-direction: column; align-items: stretch; gap: 5px; padding: 7px 9px 8px; border-radius: 11px; }
.nm--phone .nm-drop .nm-plus, .nm--phone .nm-drop small { display: none; }
.nm--phone .nm-drop > div:first-of-type { flex: none; }
.nm--phone .nm-drop b { font: 600 10.5px var(--nm-sans); font-variant: all-small-caps; letter-spacing: .05em; text-transform: lowercase; color: var(--accent-ink); }
.nm--phone .nm-drop b::before { content: "Lägg in "; }
.nm--phone .nm-drop .nm-btnrow { gap: 5px; flex-wrap: nowrap; }
.nm--phone .nm-empty { padding: 12px 8px; }
