/*
 * Nuhet reskin: components (DESIGN.md Components).
 * Markup reference: docs/design/reskin-2957/b.html (prototype prefix renamed to nh-).
 * Components without prototype markup (tabs, table, banners, toasts, dialogs,
 * empty state, pagination, selection bar) follow the DESIGN.md prose.
 */

/* ---------- text helpers ---------- */
.nh-hint{color:var(--nh-muted);font-size:var(--nh-size-body-sm)}
.nh-sub{margin-top:var(--nh-space-lg);font-weight:var(--nh-weight-semibold)}
.nh-link{font-weight:var(--nh-weight-semibold);text-decoration:none}
.nh-link:hover{text-decoration:underline}

/* ---------- buttons ---------- */
.nh-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--nh-space-sm);min-height:var(--nh-space-touch);padding:var(--nh-btn-padding);border-radius:var(--nh-radius-md);border:1px solid var(--nh-line);background:var(--nh-surface);font:var(--nh-font-body-md-strong);text-decoration:none;cursor:pointer;color:var(--nh-ink);white-space:nowrap}
.nh-btn svg{width:var(--nh-icon-md);height:var(--nh-icon-md);opacity:.8}
.nh-btn:hover{background:var(--nh-surface-hover)}
.nh-btn:disabled,.nh-btn[aria-disabled="true"]{opacity:.5;cursor:not-allowed}
.nh .nh-btn-primary{background:var(--nh-primary);border-color:var(--nh-primary);color:var(--nh-on-primary)}
.nh .nh-btn-primary:hover{background:var(--nh-primary-hover);border-color:var(--nh-primary-hover)}
.nh .nh-btn-primary:disabled,.nh .nh-btn-primary[aria-disabled="true"]{background:var(--nh-primary);border-color:var(--nh-primary)}
.nh-btn-primary svg{opacity:1}
.nh .nh-btn-quiet{border-color:transparent;background:transparent;color:var(--nh-primary);padding:var(--nh-btn-quiet-padding)}
.nh .nh-btn-quiet:hover{background:var(--nh-info-bg)}
.nh .nh-btn-danger{color:var(--nh-bad)}
.nh-btn-lg{min-height:var(--nh-space-control-lg);font:var(--nh-font-body-lg);width:100%}
.nh-btn-compact{min-height:var(--nh-btn-compact-height);padding:var(--nh-btn-compact-padding);font-size:var(--nh-size-body-sm)}
.nh-actions{display:flex;flex-wrap:wrap;gap:var(--nh-space-sm)}

/* ---------- cards ---------- */
.nh-card{background:var(--nh-surface);border:1px solid var(--nh-line);border-radius:var(--nh-radius-xl);padding:var(--nh-card-padding);min-width:0}
.nh-card h2{font:var(--nh-font-headline-sm)}
.nh-cardhead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--nh-space-sm) var(--nh-space-md);margin-bottom:var(--nh-space-md)}
.nh-cardfoot{display:flex;flex-wrap:wrap;align-items:center;gap:var(--nh-space-sm);margin-top:var(--nh-space-lg);padding-top:var(--nh-space-lg);border-top:1px solid var(--nh-line)}
.nh-linkrow{margin-top:var(--nh-space-md);padding-top:var(--nh-space-md);border-top:1px solid var(--nh-line)}
.nh-linkrow a{font-weight:var(--nh-weight-semibold);text-decoration:none}
.nh-linkrow a:hover{text-decoration:underline}

/* ---------- status pills (word comes from lang files, modifier picks colour) ---------- */
.nh-pill,.nh-badge,.nh-flag{-webkit-user-select:none;user-select:none}
.nh-pill{display:inline-flex;align-items:center;gap:var(--nh-space-xs-sm);min-height:var(--nh-pill-height);padding:var(--nh-space-2xs) var(--nh-space-sm-md);border-radius:var(--nh-radius-full);font:var(--nh-font-label-md);white-space:nowrap;color:var(--nh-muted);background:var(--nh-ground)}
.nh-pill::before{content:"";width:var(--nh-dot);height:var(--nh-dot);border-radius:50%;background:currentColor;flex:none}
.nh-pill-planned{color:var(--nh-info);background:var(--nh-info-bg)}
.nh-pill-running{color:var(--nh-warn);background:var(--nh-warn-bg)}
.nh-pill-done{color:var(--nh-ok);background:var(--nh-ok-bg)}
.nh-pill-stopped{color:var(--nh-bad);background:var(--nh-bad-bg)}
.nh-pill-neutral{color:var(--nh-muted);background:var(--nh-ground)}

/* ---------- stat tiles ---------- */
.nh-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--nh-space-sm)}
.nh-tile{background:var(--nh-surface);border:1px solid var(--nh-line);border-radius:var(--nh-radius-xl);padding:var(--nh-tile-padding);display:flex;flex-direction:column;gap:var(--nh-space-xs);min-width:0}
.nh-tile .nh-tilelabel{color:var(--nh-muted);font:var(--nh-font-label-md-regular)}
.nh-tile .nh-tileval{font:var(--nh-font-display);font-variant-numeric:tabular-nums}

/* ---------- progress bars (bar width is the one allowed inline style) ---------- */
.nh-bar{height:var(--nh-progress-height);border-radius:var(--nh-radius-full);background:var(--nh-ground);overflow:hidden;margin-top:var(--nh-space-xs-sm)}
.nh-bar>span{display:block;height:100%;border-radius:var(--nh-radius-full);background:var(--nh-accent)}

/* usage bar */
.nh-usage{margin-top:var(--nh-space-sm);background:var(--nh-surface);border:1px solid var(--nh-line);border-radius:var(--nh-radius-xl);padding:var(--nh-tile-padding)}
.nh-usage .nh-usagetext{display:flex;flex-wrap:wrap;justify-content:space-between;gap:var(--nh-space-xs) var(--nh-space-md);font-size:var(--nh-size-body-sm)}
.nh-usage .nh-usagetext strong{font-weight:var(--nh-weight-semibold);font-variant-numeric:tabular-nums}
.nh-usage .nh-bar{height:var(--nh-progress-height-usage)}

/* metric bars (latest sendout card) */
.nh-hbar{margin-top:var(--nh-space-md-lg)}
.nh-hbar .nh-hbarlabel{display:flex;justify-content:space-between;gap:var(--nh-space-md);font-size:var(--nh-size-body-sm);margin-bottom:var(--nh-space-xs)}
.nh-hbar .nh-hbarlabel strong{font-weight:var(--nh-weight-semibold);font-variant-numeric:tabular-nums}
.nh-hbar .nh-bar{height:var(--nh-progress-height-metric);margin-top:0}

/* ---------- date chips ---------- */
.nh-datechip{width:var(--nh-datechip-size);height:var(--nh-datechip-size);border-radius:var(--nh-radius-lg);background:var(--nh-ground);color:var(--nh-ink);display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;font-variant-numeric:tabular-nums;flex:none}
.nh-datechip b{font-size:var(--nh-size-headline-md);font-weight:var(--nh-weight-semibold)}
.nh-datechip small{font:var(--nh-font-label-sm-regular);color:var(--nh-muted)}

/* ---------- sendout rows ---------- */
.nh-sendouts li{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"date subject" "date meta";gap:var(--nh-space-2xs) var(--nh-space-md);align-items:center;padding:var(--nh-space-md) 0;border-top:1px solid var(--nh-line)}
.nh-sendouts li:first-child{border-top:0;padding-top:var(--nh-space-xs)}
.nh-sendouts .nh-datechip{grid-area:date}
.nh-sendouts .nh-subject{grid-area:subject;font-weight:var(--nh-weight-semibold);min-width:0;overflow-wrap:anywhere}
.nh-sendouts .nh-meta{grid-area:meta;display:flex;flex-wrap:wrap;align-items:center;gap:var(--nh-space-xs-sm) var(--nh-space-md);font-size:var(--nh-size-body-sm);color:var(--nh-muted)}
.nh-sendouts .nh-result{margin-left:auto;color:var(--nh-ink);font-variant-numeric:tabular-nums}
.nh-sendouts .nh-result a{font-weight:var(--nh-weight-semibold);text-decoration:none}
.nh-sendouts .nh-result a:hover{text-decoration:underline}

/* ---------- thumbnails (drawn newsletter previews) ---------- */
.nh-thumb{aspect-ratio:4/3;border-radius:var(--nh-radius-sm);border:1px solid var(--nh-line);background:var(--nh-surface-sunken);padding:10% 12%;display:flex;flex-direction:column;gap:6%;overflow:hidden;width:100%}
.nh-thumb i{display:block;border-radius:var(--nh-radius-xs);background:var(--nh-line)}
.nh-thumb .nh-t-head{height:14%;background:var(--nh-accent)}
.nh-thumb .nh-t-img{height:26%;background:var(--nh-placeholder-block)}
.nh-thumb .nh-t-line{height:6%}
.nh-thumb .nh-t-short{height:6%;width:60%}
.nh-thumb.nh-thumb-2 .nh-t-head{background:var(--nh-primary)}
.nh-thumb.nh-thumb-3 .nh-t-head{background:var(--nh-warn)}
.nh-thumb.nh-thumb-4 .nh-t-head{background:var(--nh-placeholder-block)}
img.nh-thumb{padding:0;object-fit:cover}

/* ---------- list container ---------- */
.nh-list{background:var(--nh-surface);border:1px solid var(--nh-line);border-radius:var(--nh-radius-xl);overflow:visible;min-width:0}
.nh-listhead{display:none}
.nh-item{display:grid;grid-template-columns:var(--nh-thumb-list) minmax(0,1fr);grid-template-areas:"thumb name" "thumb date" "acts acts";gap:var(--nh-space-2xs) var(--nh-space-md-lg);padding:var(--nh-space-md-lg) var(--nh-space-lg);border-top:1px solid var(--nh-line)}
.nh-item:first-of-type{border-top:0}
.nh-listhead+.nh-item{border-top:0}
.nh-item>.nh-thumb,.nh-item>.nh-leadcell{grid-area:thumb;width:var(--nh-thumb-list)}
.nh-item .nh-thumb{aspect-ratio:4/3;gap:5%;padding:8%}
.nh-item .nh-name{grid-area:name;font-weight:var(--nh-weight-semibold);align-self:end;min-width:0;overflow-wrap:anywhere}
.nh-item .nh-date{grid-area:date;color:var(--nh-muted);font-size:var(--nh-size-body-sm);align-self:start}
.nh-item .nh-itemacts{grid-area:acts;display:flex;flex-wrap:wrap;gap:var(--nh-space-sm);margin-top:var(--nh-space-sm-md)}
.nh-item .nh-btn{min-height:var(--nh-btn-compact-height);padding:var(--nh-btn-compact-padding);font-size:var(--nh-size-body-sm)}
.nh-listfoot{padding:var(--nh-space-md) var(--nh-space-lg);border-top:1px solid var(--nh-line);color:var(--nh-muted);font-size:var(--nh-size-body-sm)}

/* ---------- "Mer" menu ---------- */
.nh-more{position:relative}
.nh-more summary{list-style:none;display:inline-flex;align-items:center;gap:var(--nh-space-xs-sm);min-height:var(--nh-btn-compact-height);padding:var(--nh-btn-compact-padding);border:1px solid var(--nh-line);border-radius:var(--nh-radius-md);font-weight:var(--nh-weight-semibold);font-size:var(--nh-size-body-sm);cursor:pointer;background:var(--nh-surface)}
.nh-more summary::-webkit-details-marker{display:none}
.nh-more summary svg{width:var(--nh-icon-sm);height:var(--nh-icon-sm)}
.nh-more summary:hover{background:var(--nh-surface-hover)}
.nh-more[open] summary{background:var(--nh-ground)}
.nh-menu{position:absolute;top:calc(100% + var(--nh-space-xs-sm));left:0;z-index:4;min-width:var(--nh-menu-min);background:var(--nh-surface);border:1px solid var(--nh-line);border-radius:var(--nh-radius-lg);padding:var(--nh-menu-padding);display:flex;flex-direction:column;box-shadow:var(--nh-shadow-menu)}
.nh-menu :is(a,button){display:flex;align-items:center;gap:var(--nh-space-sm-md);min-height:var(--nh-space-touch);padding:var(--nh-space-sm) var(--nh-space-md);border:0;background:transparent;border-radius:var(--nh-radius-sm);text-align:left;font-weight:var(--nh-weight-medium);color:var(--nh-ink);text-decoration:none;cursor:pointer;width:100%}
.nh-menu :is(a,button):hover{background:var(--nh-ground)}
.nh-menu svg{width:var(--nh-icon-md);height:var(--nh-icon-md);opacity:.75}
.nh-menu .nh-danger{color:var(--nh-bad)}
/* in list rows the Mer button sits last, so its menu opens leftwards from the button's right edge at every width */
.nh-item .nh-itemacts .nh-more .nh-menu{left:auto;right:0}

/* ---------- toolbar ---------- */
.nh-toolbar{display:flex;flex-wrap:wrap;gap:var(--nh-space-sm-md) var(--nh-space-lg);align-items:center;margin-bottom:var(--nh-space-md)}
.nh-search{position:relative;flex:1 1 var(--nh-tile-min);min-width:0}
.nh-search svg{position:absolute;left:var(--nh-space-md);top:50%;translate:0 -50%;width:var(--nh-icon-md);height:var(--nh-icon-md);color:var(--nh-muted);pointer-events:none}
.nh-search .nh-input{padding-left:var(--nh-space-3xl)}
.nh-search label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.nh-toggle{display:flex;align-items:center;gap:var(--nh-space-sm);min-height:var(--nh-space-touch);cursor:pointer;font-weight:var(--nh-weight-medium)}
.nh-toggle input{width:var(--nh-control-check);height:var(--nh-control-check);margin:0;accent-color:var(--nh-primary)}

/* ---------- form fields ---------- */
.nh-field{display:flex;flex-direction:column;gap:var(--nh-space-xs-sm);margin-top:var(--nh-space-md-lg)}
.nh-field>label{font-weight:var(--nh-weight-semibold)}
.nh-input{min-height:var(--nh-space-touch);padding:var(--nh-input-padding);border:1px solid var(--nh-line-strong);border-radius:var(--nh-radius-md);font:inherit;color:var(--nh-ink);background:var(--nh-surface);width:100%;min-width:0}
.nh-input:hover{border-color:var(--nh-line-hover)}
textarea.nh-input{min-height:calc(var(--nh-space-touch) * 3);resize:vertical}
select.nh-input{appearance:none;-webkit-appearance:none;padding-right:var(--nh-space-3xl);background-image:var(--nh-chevron);background-repeat:no-repeat;background-position:right var(--nh-space-md) center;background-size:var(--nh-icon-sm) var(--nh-icon-sm)}
.nh-input[aria-invalid="true"]{border-color:var(--nh-bad)}
.nh-error{display:flex;align-items:flex-start;gap:var(--nh-space-xs-sm);color:var(--nh-bad);font-size:var(--nh-size-body-sm)}
.nh-error svg{width:var(--nh-icon-sm);height:var(--nh-icon-sm);margin-top:var(--nh-space-2xs)}
.nh-timegrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--nh-space-sm-md);margin-top:var(--nh-space-sm-md);padding-left:var(--nh-choice-indent)}
.nh-timegrid .nh-field{margin-top:0}

/* ---------- choice rows ---------- */
.nh-rows{display:flex;flex-direction:column}
.nh-row{display:flex;align-items:center;gap:var(--nh-space-md);padding:var(--nh-space-md) var(--nh-space-xs);border-top:1px solid var(--nh-line);cursor:pointer}
.nh-row:first-child{border-top:0}
.nh-row input{width:var(--nh-control-check);height:var(--nh-control-check);margin:0;flex:none;accent-color:var(--nh-primary);cursor:pointer}
.nh-row .nh-rowtext{flex:1;min-width:0}
.nh-row .nh-rowname{font-weight:var(--nh-weight-semibold);display:block;overflow-wrap:anywhere}
.nh-row .nh-rowsub{color:var(--nh-muted);font-size:var(--nh-size-body-sm);display:block}
.nh-row .nh-rowcount{font-variant-numeric:tabular-nums;font-weight:var(--nh-weight-semibold);white-space:nowrap}

/* ---------- choice cards ---------- */
.nh-choicegrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--nh-space-sm-md)}
.nh-choice{position:relative;display:flex;flex-direction:column;gap:var(--nh-space-sm);padding:var(--nh-space-sm-md);border:1px solid var(--nh-line);border-radius:var(--nh-radius-xl);cursor:pointer;background:var(--nh-surface);min-width:0}
.nh-choice:hover{border-color:var(--nh-line-hover)}
.nh-choice input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.nh-choice:has(input:focus-visible){outline:var(--nh-focus-width) solid var(--nh-focus);outline-offset:var(--nh-focus-offset)}
.nh-choice:has(input:checked){border-color:var(--nh-primary);box-shadow:inset 0 0 0 1px var(--nh-primary)}
.nh-choice .nh-choicename{font-weight:var(--nh-weight-semibold);font-size:var(--nh-size-body-sm);line-height:1.3;display:flex;gap:var(--nh-space-sm);align-items:flex-start;overflow-wrap:anywhere}
.nh-choice .nh-choicedate{color:var(--nh-muted);font-size:var(--nh-size-label-md)}
.nh-check{width:var(--nh-control-check);height:var(--nh-control-check);border-radius:50%;border:var(--nh-check-border) solid var(--nh-line-strong);flex:none;display:grid;place-items:center;color:var(--nh-on-primary);margin-top:1px}
.nh-check svg{width:var(--nh-icon-xs);height:var(--nh-icon-xs);opacity:0}
.nh-choice:has(input:checked) .nh-check{background:var(--nh-primary);border-color:var(--nh-primary)}
.nh-choice:has(input:checked) .nh-check svg{opacity:1}

/* ---------- total box ---------- */
.nh-total{margin-top:var(--nh-space-md);padding:var(--nh-total-padding);border-radius:var(--nh-radius-md);background:var(--nh-accent-soft);color:var(--nh-ink);display:flex;flex-wrap:wrap;gap:var(--nh-space-xs) var(--nh-space-md);align-items:baseline}
.nh-total strong{font:var(--nh-font-headline-sm);font-variant-numeric:tabular-nums}
.nh-total .nh-hint{flex-basis:100%}

/* ---------- numbered steps ---------- */
.nh-steps{display:flex;flex-direction:column;gap:var(--nh-space-lg);min-width:0}
.nh-step{scroll-margin-top:var(--nh-step-anchor-offset)}
.nh-step .nh-stephead{display:flex;align-items:center;gap:var(--nh-space-md);margin-bottom:var(--nh-space-md)}
.nh-stepnum{width:var(--nh-stepnum-size);height:var(--nh-stepnum-size);border-radius:50%;background:var(--nh-ink);color:var(--nh-on-primary);display:grid;place-items:center;font-weight:var(--nh-weight-semibold);font-size:var(--nh-size-body-sm);flex:none}
.nh .nh-step h2{font:var(--nh-font-headline-md)}

/* ---------- summary panel ---------- */
.nh-summarypanel .nh-checklist{display:flex;flex-direction:column;gap:var(--nh-space-sm-md);margin:var(--nh-space-md) 0 var(--nh-space-lg)}
.nh-checklist li{display:grid;grid-template-columns:var(--nh-check-circle) minmax(0,1fr);gap:var(--nh-space-sm);align-items:start}
.nh-checklist .nh-ok-ico{width:var(--nh-check-circle);height:var(--nh-check-circle);border-radius:50%;background:var(--nh-ok-bg);color:var(--nh-ok);display:grid;place-items:center}
.nh-checklist .nh-ok-ico svg{width:var(--nh-icon-xs);height:var(--nh-icon-xs)}
.nh-checklist .nh-cl-label{color:var(--nh-muted);font:var(--nh-font-label-md-regular)}
.nh-checklist .nh-cl-val{font-weight:var(--nh-weight-semibold);line-height:1.3;overflow-wrap:anywhere}
.nh-summarypanel .nh-btn+.nh-btn{margin-top:var(--nh-space-sm)}
.nh-summarypanel .nh-hint{margin-top:var(--nh-space-md)}

/* ---------- mobile action bar and bulk selection bar (phone + tablet) ---------- */
.nh-mobilebar,.nh-selectionbar{position:sticky;bottom:calc(var(--nh-space-mobilebar-offset) + env(safe-area-inset-bottom,0px));z-index:5;margin:var(--nh-space-lg) calc(var(--nh-space-gutter-phone) * -1) calc(var(--nh-space-xl) * -1);padding:var(--nh-space-sm-md) var(--nh-space-gutter-phone);background:var(--nh-surface);border-top:1px solid var(--nh-line);box-shadow:var(--nh-shadow-bar);display:flex;align-items:center;gap:var(--nh-space-md)}
.nh-mobilebar .nh-mbtext{flex:1;min-width:0;font:var(--nh-font-label-md-regular)}
.nh-mobilebar .nh-mbtext strong{display:block;font-size:var(--nh-size-body-sm);font-weight:var(--nh-weight-semibold)}
.nh-mobilebar .nh-btn{flex:none}
.nh-selectionbar{flex-wrap:wrap}
.nh-selectionbar .nh-selcount{flex:1 1 auto;font-weight:var(--nh-weight-semibold);font-variant-numeric:tabular-nums}
.nh-selectionbar .nh-actions{flex:0 1 auto}

/* ---------- segment tabs ---------- */
.nh-tabs{margin-bottom:var(--nh-space-lg);border-bottom:1px solid var(--nh-line);overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
.nh-tabs::-webkit-scrollbar{display:none}
.nh-tabs ul{display:flex;gap:var(--nh-space-xs)}
.nh-tabs li{flex:none}
.nh-tabs a{display:flex;align-items:center;min-height:var(--nh-space-touch);padding:0 var(--nh-space-md);border-bottom:var(--nh-indicator) solid transparent;color:var(--nh-muted);font:var(--nh-font-nav-desktop);text-decoration:none;white-space:nowrap}
.nh-tabs a:hover{color:var(--nh-ink)}
.nh-tabs a[aria-current="page"]{color:var(--nh-ink);font-weight:var(--nh-weight-semibold);border-bottom-color:var(--nh-accent)}
.nh-tabs a:focus-visible{outline-offset:calc(var(--nh-focus-width) * -1)}

/* ---------- data table (stacks into labelled rows below 700px) ---------- */
.nh-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.nh-table caption{padding:var(--nh-space-md) var(--nh-space-lg);text-align:left;font:var(--nh-font-headline-sm)}
.nh-table thead{display:none}
.nh-table tr{display:block;padding:var(--nh-space-md) var(--nh-space-lg);border-top:1px solid var(--nh-line)}
.nh-table tbody tr:first-child{border-top:0}
.nh-table td{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:var(--nh-space-md);padding:var(--nh-space-xs) 0;overflow-wrap:anywhere}
.nh-table td::before{content:attr(data-label);color:var(--nh-muted);font:var(--nh-font-label-md-regular);align-self:center}
.nh-table td:not([data-label])::before{content:none}
.nh-table td:not([data-label]){grid-template-columns:minmax(0,1fr)}
.nh-table td:first-child{font-weight:var(--nh-weight-semibold)}
/* The row's name cell (data-primary) is the stacked block's title on phone: full width, no label, breaks between words. */
.nh-table td[data-primary]{grid-template-columns:minmax(0,1fr);font-weight:var(--nh-weight-semibold);overflow-wrap:break-word;word-break:normal}
.nh-table td[data-primary]::before{content:none}
.nh-table td[data-select]{float:left;display:block;padding:var(--nh-space-xs) var(--nh-space-md) 0 0}
.nh-table td[data-select]::before{content:none}

/* ---------- banners ---------- */
.nh-banner{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--nh-space-sm) var(--nh-space-md);padding:var(--nh-banner-padding);border-radius:var(--nh-radius-md);background:var(--nh-info-bg);color:var(--nh-info)}
.nh-banner>svg{width:var(--nh-icon-md);height:var(--nh-icon-md);margin-top:var(--nh-space-2xs)}
.nh-banner .nh-bannertext{flex:1 1 var(--nh-menu-min);min-width:0}
.nh-banner .nh-btn-quiet{min-height:var(--nh-btn-compact-height);padding-block:0;color:inherit;margin:calc(var(--nh-space-sm-md) * -1) 0}
.nh-banner .nh-btn-quiet:hover{background:var(--nh-surface)}
.nh-banner-info{background:var(--nh-info-bg);color:var(--nh-info)}
.nh-banner-ok{background:var(--nh-ok-bg);color:var(--nh-ok)}
.nh-banner-warn{background:var(--nh-warn-bg);color:var(--nh-warn)}
.nh-banner-bad{background:var(--nh-bad-bg);color:var(--nh-bad)}

/* ---------- toasts (phone: above the bottom nav; tablet up: top right) ---------- */
.nh-toasts{position:fixed;z-index:30;left:var(--nh-space-gutter-phone);right:var(--nh-space-gutter-phone);bottom:calc(var(--nh-space-mobilebar-offset) + var(--nh-space-sm) + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:var(--nh-space-sm);pointer-events:none}
.nh-toast{display:flex;align-items:flex-start;gap:var(--nh-space-md);padding:var(--nh-space-md) var(--nh-space-md) var(--nh-space-md) var(--nh-space-lg);background:var(--nh-surface);border:1px solid var(--nh-line);border-left:var(--nh-toast-edge) solid var(--nh-info);border-radius:var(--nh-radius-md);box-shadow:var(--nh-shadow-menu);pointer-events:auto;animation:nh-fade-in var(--nh-duration) ease-out}
.nh-toast .nh-toasttext{flex:1;min-width:0}
.nh-toast .nh-toastclose{display:inline-grid;place-items:center;width:var(--nh-space-touch);height:var(--nh-space-touch);margin:calc(var(--nh-space-md) * -1);border:0;border-radius:var(--nh-radius-md);background:transparent;color:var(--nh-muted)}
.nh-toast .nh-toastclose:hover{background:var(--nh-ground)}
.nh-toast .nh-toastclose svg{width:var(--nh-icon-md);height:var(--nh-icon-md)}
.nh-toast-info{border-left-color:var(--nh-info)}
.nh-toast-ok{border-left-color:var(--nh-ok)}
.nh-toast-warn{border-left-color:var(--nh-warn)}
.nh-toast-bad{border-left-color:var(--nh-bad)}
@keyframes nh-fade-in{from{opacity:0}to{opacity:1}}

/* ---------- dialogs (<dialog class="nh-dialog">) ---------- */
.nh-dialog{width:calc(100% - var(--nh-space-gutter-phone) * 2);max-width:var(--nh-dialog-max);padding:var(--nh-space-xl);border:1px solid var(--nh-line);border-radius:var(--nh-radius-xl);background:var(--nh-surface);color:var(--nh-ink);box-shadow:var(--nh-shadow-menu)}
.nh-dialog::backdrop{background:var(--nh-scrim)}
.nh-dialog h2{font:var(--nh-font-headline-sm);margin-bottom:var(--nh-space-sm)}
.nh-dialog .nh-actions{margin-top:var(--nh-space-xl);justify-content:flex-end}

/* ---------- empty state ---------- */
.nh-empty{background:var(--nh-surface);border:1px solid var(--nh-line);border-radius:var(--nh-radius-xl);padding:var(--nh-space-xl) var(--nh-card-padding);display:flex;flex-direction:column;align-items:flex-start;gap:var(--nh-space-sm)}
.nh-empty h2{font:var(--nh-font-headline-sm)}
.nh-empty p{color:var(--nh-muted)}
.nh-empty .nh-btn{margin-top:var(--nh-space-sm)}

/* ---------- pagination ---------- */
.nh-pagination{display:flex;flex-direction:column;align-items:stretch;gap:var(--nh-space-sm);padding:var(--nh-space-md) var(--nh-space-lg);border-top:1px solid var(--nh-line)}
.nh-pagination .nh-pagetext{color:var(--nh-muted);font-size:var(--nh-size-body-sm);font-variant-numeric:tabular-nums}
.nh-pagination .nh-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}

/* ================= tablet ================= */
@media (min-width: 700px){
  .nh-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
  .nh-choicegrid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .nh-item{grid-template-columns:var(--nh-thumb-list) minmax(0,1fr) auto;grid-template-areas:"thumb name acts" "thumb date acts";align-items:center}
  .nh-item .nh-itemacts{margin-top:0;justify-content:flex-end;flex-wrap:nowrap}
  .nh-menu{left:auto;right:0}
  .nh-mobilebar,.nh-selectionbar{margin-inline:calc(var(--nh-space-gutter-tablet) * -1);padding-inline:var(--nh-space-gutter-tablet);bottom:0}

  .nh-table thead{display:table-header-group}
  .nh-table tr{display:table-row;padding:0;border-top:0}
  .nh-table :is(th,td){display:table-cell;padding:var(--nh-space-md) var(--nh-space-lg);border-top:1px solid var(--nh-line);text-align:left;vertical-align:middle}
  .nh-table th{font:var(--nh-font-label-md);color:var(--nh-muted);white-space:nowrap}
  .nh-table thead th{border-top:0;border-bottom:1px solid var(--nh-line)}
  .nh-table tbody tr:first-child td{border-top:0}
  .nh-table td[data-select]{float:none;display:table-cell;width:1%;padding:var(--nh-space-md) 0 var(--nh-space-md) var(--nh-space-lg)}
  .nh-table td::before{content:none}
  .nh-table .nh-num,.nh-table [data-align="end"]{text-align:right}

  .nh-toasts{left:auto;right:var(--nh-space-gutter-tablet);top:calc(var(--nh-space-topbar) + var(--nh-space-lg));bottom:auto;width:var(--nh-toast-max)}

  .nh-pagination{flex-direction:row;align-items:center;justify-content:space-between}
  .nh-pagination .nh-actions{display:flex}
}

/* ================= desktop ================= */
@media (min-width: 1024px){
  .nh-mobilebar{display:none}
  .nh-selectionbar{margin-inline:calc(var(--nh-space-gutter-desktop) * -1);margin-bottom:calc(var(--nh-space-3xl) * -1);padding-inline:var(--nh-space-gutter-desktop)}
  /* head and rows share one template, so labels sit over their columns and the actions column never varies per row */
  .nh-listhead{display:grid;grid-template-columns:var(--nh-thumb-list) minmax(0,1fr) var(--nh-list-date-col) var(--nh-space-list-actions);gap:var(--nh-space-md-lg);padding:var(--nh-space-sm-md) var(--nh-space-lg);border-bottom:1px solid var(--nh-line);color:var(--nh-muted);font:var(--nh-font-label-md);white-space:nowrap}
  .nh-listhead>span:nth-child(2){display:contents}
  /* row actions are right-aligned in their column (.nh-itemacts justify-content:flex-end), so the label is too */
  .nh-listhead>span:last-child{text-align:right}
  .nh-item{grid-template-columns:var(--nh-thumb-list) minmax(0,1fr) var(--nh-list-date-col) var(--nh-space-list-actions);grid-template-areas:"thumb name date acts"}
  .nh-item .nh-name{align-self:center}
  .nh-item .nh-date{align-self:center;font-size:var(--nh-size-body-md)}
  .nh-toasts{top:var(--nh-space-xl);right:var(--nh-space-gutter-desktop)}
}

/* Approved sent/opened/bounced metric labels, shared across v2 count presentations. */
.nh-count-label{display:inline-flex;align-items:center;gap:var(--nh-space-xs)}
.nh-count-label>svg{flex:none}
