/*
 * app.css — the app shell: the frame around the sheet of paper.
 *
 *   notes list | top bar
 *              | tool tray
 *              | banner
 *              | stage (the written or the typed view) ... side panel over its right edge
 *
 * The window never scrolls; the list, the two views and the panel do.
 * Below 1000 px the notes list is a drawer, below 700 px the panel is as
 * wide as the window. The top bar adapts to its own width, not to the
 * window: the same bar is narrow beside an open list and wide without it.
 * The widths used for that are also in js/app.js (BAR_STEPS).
 *
 * Colors come from tokens.css only.
 */

/* ------------------------------ frame ----------------------------- */
.nb-app {
  position: relative;
  height: 100%;
  /* with the software keyboard up (iPadOS, iOS) the app follows the part of the
     window that is on screen: js/app.js sets these from the visual viewport */
  height: var(--nb-vv-h, 100%);
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;                      /* the panel and the drawer wait outside the frame */
  overflow: clip;                        /* and moving the focus into them must not scroll it */
  background: var(--desk);
}
.nb-app.is-panned { transform: translateY(var(--nb-vv-top, 0px)); }
/* While handwriting is read or written out, the sheet takes no pen: a stroke
   drawn meanwhile would arrive after the copy the conversion works on. */
.nb-app.is-busy .nb-ink-host, .nb-app.is-busy .nb-ed-host { pointer-events: none; }
.nb-app-main {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding-right: env(safe-area-inset-right, 0px);
}
/* Until the app knows its settings, the list and the shade stay out of sight:
   a drawer must not flash open on a phone while the page loads. */
.nb-app:not(.is-ready) > .nb-app-sidebar,
.nb-app:not(.is-ready) > .nb-app-scrim { visibility: hidden; transition: none; }
.nb-app-noscript {
  margin: 0; padding: 24px 20px;
  background: var(--chrome); color: var(--text);
  font: 500 var(--fs-body)/1.45 var(--font-body);
}

/* ---------------------------- notes list -------------------------- */
.nb-app-sidebar {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  background: var(--chrome);
  border-right: 1px solid var(--hairline);
}
.nb-app-sidebar__head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  min-height: 60px; padding: 8px 8px 0 20px;
}
.nb-app-wordmark { font: 600 19px/1 var(--font-display); letter-spacing: -0.01em; margin-right: auto; white-space: nowrap; }
.nb-app-new { padding-inline: 10px 12px; gap: 6px; color: var(--text); }
.nb-app-sidebar__close { display: none; }

.nb-app-search { flex: none; position: relative; margin: 4px 12px; }
.nb-app-search > .nb-icon { position: absolute; left: 11px; top: 12px; color: var(--text-3); pointer-events: none; }
.nb-app-search__input {
  width: 100%; height: var(--tap);
  padding: 0 12px 0 40px;
  border: 1px solid transparent; border-radius: var(--r-m);
  background: var(--track); color: var(--text);
  font: 400 16px/1.2 var(--font-body);   /* 16px stops iOS from zooming on focus */
  -webkit-appearance: none; appearance: none;
}
.nb-app-search__input::placeholder { color: var(--text-3); opacity: 1; }
.nb-app-search__input::-webkit-search-decoration { -webkit-appearance: none; }
.nb-app-search__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; background: var(--raised); }

.nb-app-list {
  flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-bottom: 12px;
}
.nb-app-list__group {
  padding: 18px 20px 8px;
  font: 500 var(--fs-micro)/1 var(--font-util); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
}
.nb-app-notes { list-style: none; margin: 0; padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }
.nb-app-note {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--tap); align-items: center;
  border-radius: var(--r-m);
  -webkit-touch-callout: none;            /* a long press opens our menu, not the system's */
}
.nb-app-note:hover { background: var(--hover); }
.nb-app-note.is-current { background: var(--accent-wash); }
.nb-app-note__open {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: baseline;
  min-height: 64px; min-width: 0;
  padding: 10px 0 10px 12px;
  border: 0; border-radius: var(--r-m);
  background: transparent; color: var(--text);
  text-align: left;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}
.nb-app-note__title {
  font: 600 var(--fs-body)/1.25 var(--font-body); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.nb-app-note__title.is-untitled { color: var(--text-2); font-weight: 500; }
.nb-app-note__when { font: 400 12px/1.25 var(--font-util); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nb-app-note__preview {
  font-size: var(--fs-small); line-height: 1.35; color: var(--text-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.nb-app-note__marks { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; align-self: start; color: var(--text-3); }
.nb-app-note__flag { display: inline-flex; align-items: center; gap: 2px; font: 500 12px/1 var(--font-util); font-variant-numeric: tabular-nums; }
.nb-app-note__more { color: var(--text-3); }
/* with a mouse the menu button waits until the row is pointed at; on touch it is always there */
@media (hover: hover) and (pointer: fine) {
  .nb-app-note__more { opacity: 0; }
  .nb-app-note:hover .nb-app-note__more,
  .nb-app-note.is-current .nb-app-note__more,
  .nb-app-note__more:focus-visible,
  .nb-app-note__more[aria-expanded="true"] { opacity: 1; }
}

.nb-app-is-overdue { color: var(--overdue); }
.nb-app-is-today { color: var(--today); }
.nb-app-is-upcoming, .nb-app-is-none { color: var(--upcoming); }

.nb-app-sidebar__foot {
  flex: none;
  display: flex; flex-direction: column;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline);
}
.nb-app-tallies { display: flex; flex-wrap: wrap; gap: 0 4px; padding-inline: 4px; }
.nb-app-tally {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--tap); padding: 0 8px;
  border: 0; border-radius: var(--r-s); background: transparent;
  font: 400 12px/1 var(--font-util); font-variant-numeric: tabular-nums; white-space: nowrap;
  touch-action: manipulation;
}
.nb-app-tally:hover { background: var(--hover); }
.nb-app-tally__text { color: var(--text-2); }
.nb-app-tally--none { color: var(--text-3); }
.nb-app-settings { justify-content: flex-start; padding-inline: 12px; gap: 10px; font-weight: 500; }

/* ------------------------------ top bar --------------------------- */
.nb-app-header {
  flex: none;
  container: nb-header / inline-size;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--chrome);
  border-bottom: 1px solid var(--hairline);
}
.nb-app-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(min-content, 1fr);
  align-items: center; gap: 8px;
  min-height: 54px; padding: 4px 8px;
}
.nb-app-bar__lead { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nb-app-bar__trail { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.nb-app-acts { display: flex; align-items: center; gap: 2px; }
.nb-app-save {
  display: none; min-width: 0;
  font: 400 12px/1.2 var(--font-util); font-variant-numeric: tabular-nums;
  color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nb-app-save.is-off { color: var(--today); }

.nb-app-act__label { display: none; font: 600 14px/1 var(--font-body); color: var(--text); white-space: nowrap; }
.nb-app-act:disabled .nb-app-act__label { color: inherit; }
.nb-app-more { display: none; }

/* the switch: the one bold element. Each label is set in its own medium. */
.nb-app-switch {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  min-width: 228px; padding: 3px;
  background: var(--track); border-radius: 999px;
}
.nb-app-switch__tab {
  position: relative;
  min-height: 40px; min-width: 0; padding: 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2);
  white-space: nowrap;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
/* the tab is 40 px so the bar stays quiet; its touch target is the full height of the pill */
.nb-app-switch__tab::before { content: ""; position: absolute; inset: -3px 0; }
.nb-app-switch__tab--hand { font: 700 24px/1 var(--font-hand); }
.nb-app-switch__tab--hand .nb-app-switch__label { position: relative; top: -1px; }
.nb-app-switch__tab--type { font: 600 var(--fs-body)/1 var(--font-body); letter-spacing: 0.01em; }
.nb-app-switch__tab:hover { color: var(--text); }
.nb-app-switch__tab[aria-selected="true"] { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-thumb); }
.nb-app-switch__tab[aria-disabled="true"] { cursor: default; }
.nb-app-switch__tab[aria-disabled="true"]:not(.is-busy):not([aria-selected="true"]) { opacity: 0.45; }
.nb-app-switch__tab.is-busy { color: var(--text); }
.nb-app-switch__bar {
  position: absolute; left: 22px; right: 22px; bottom: 5px;
  height: 2px; border-radius: 2px;
  background: var(--hairline-strong); overflow: hidden;
}
.nb-app-switch__bar > i { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--accent); transition: width 240ms var(--ease); }
/* no count yet: the line runs instead of filling */
.nb-app-switch__bar.is-open > i { width: 36%; position: relative; animation: nb-slide 1.4s var(--ease) infinite; }

/* the bar adapts to its own width */
@container nb-header (min-width: 820px) {
  .nb-app-save { display: block; }
}
@container nb-header (min-width: 960px) {
  .nb-app-act--lead { width: auto; padding-inline: 10px 12px; gap: 6px; }
  .nb-app-act--lead .nb-app-act__label { display: inline; }
  .nb-app-act--lead .nb-iconbtn__count { position: static; }
}
@container nb-header (min-width: 1300px) {
  .nb-app-act { width: auto; padding-inline: 10px 12px; gap: 6px; }
  .nb-app-act .nb-app-act__label { display: inline; }
}
@container nb-header (max-width: 699px) {
  .nb-app-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
  .nb-app-act--file, .nb-app-acts + .nb-vr { display: none; }
  .nb-app-more { display: inline-flex; }
  .nb-app-switch { min-width: 0; }
  .nb-app-switch__tab { padding-inline: 8px; }
  .nb-app-switch__tab .nb-icon { display: none; }
  .nb-app-switch__bar { left: 14px; right: 14px; }
}
@container nb-header (max-width: 379px) {
  .nb-app-bar { gap: 2px; padding-inline: 4px; }
  .nb-app-switch__tab { padding-inline: 4px; }
  .nb-app-switch__tab--hand { font-size: 21px; }
  .nb-app-switch__tab--type { font-size: 14px; }
}
/* browsers without container queries: js/app.js writes the step to data-w */
@supports not (container-type: inline-size) {
  .nb-app-header[data-w="base"] .nb-app-save,
  .nb-app-header[data-w="mid"] .nb-app-save,
  .nb-app-header[data-w="wide"] .nb-app-save { display: block; }
  .nb-app-header[data-w="mid"] .nb-app-act--lead,
  .nb-app-header[data-w="wide"] .nb-app-act { width: auto; padding-inline: 10px 12px; gap: 6px; }
  .nb-app-header[data-w="mid"] .nb-app-act--lead .nb-app-act__label,
  .nb-app-header[data-w="wide"] .nb-app-act .nb-app-act__label { display: inline; }
  .nb-app-header[data-w="mid"] .nb-app-act--lead .nb-iconbtn__count,
  .nb-app-header[data-w="wide"] .nb-app-act--lead .nb-iconbtn__count { position: static; }
  .nb-app-header[data-w="compact"] .nb-app-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
  .nb-app-header[data-w="compact"] .nb-app-act--file,
  .nb-app-header[data-w="compact"] .nb-app-acts + .nb-vr { display: none; }
  .nb-app-header[data-w="compact"] .nb-app-more { display: inline-flex; }
  .nb-app-header[data-w="compact"] .nb-app-switch { min-width: 0; }
  .nb-app-header[data-w="compact"] .nb-app-switch__tab { padding-inline: 8px; }
  .nb-app-header[data-w="compact"] .nb-app-switch__tab .nb-icon { display: none; }
}

/* ----------------------------- tool tray -------------------------- */
.nb-app-toolbar {
  flex: none; min-width: 0;
  background: var(--chrome);
  border-bottom: 1px solid var(--hairline);
}

/* ------------------------------ banner ---------------------------- */
.nb-app-banner { flex: none; display: flex; flex-direction: column; }
.nb-app-banner__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px;
  padding: 4px 8px 4px 16px; min-height: 48px;
  background: var(--upcoming-wash); color: var(--text);
  border-bottom: 1px solid var(--hairline);
  font-size: 14px; line-height: 1.4;
}
.nb-app-banner__row--warn { background: var(--today-wash); }
.nb-app-banner__row > .nb-icon { color: var(--upcoming); }
.nb-app-banner__row--warn > .nb-icon { color: var(--today); }
.nb-app-banner__text { flex: 1 1 240px; min-width: 0; padding-block: 6px; }
.nb-app-banner__acts { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nb-app-banner__acts .nb-btn { color: var(--text); text-decoration: underline; text-underline-offset: 3px; padding-inline: 10px; }

/* ------------------------------- stage ---------------------------- */
.nb-app-stage {
  position: relative;
  flex: 1; min-height: 0; min-width: 0;
  background: var(--desk);
}
/* :where() keeps these at zero weight, so the views can overrule them in their own files */
:where(.nb-app-stage) > :where(.nb-ink-host, .nb-ed-host) {
  position: absolute; inset: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.nb-app.is-dropping .nb-app-stage::after {
  content: ""; position: absolute; inset: 8px; z-index: 4;
  border: 2px dashed var(--accent); border-radius: var(--r-l);
  background: var(--band);
  pointer-events: none;
}
.nb-app-blank {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.nb-app-blank__card {
  width: min(100%, 420px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.nb-app-blank__card > .nb-icon { color: var(--text-3); }
.nb-app-blank__title { font: 600 var(--fs-head)/1.15 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.nb-app-blank__text { color: var(--text-2); max-width: 46ch; }
.nb-app-blank__acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }

/* ----------------------------- side panel ------------------------- */
.nb-app-panel {
  position: absolute; z-index: 10;
  top: var(--nb-app-stage-top, 0px); right: 0; bottom: 0;
  width: min(392px, 100%);
  display: flex; flex-direction: column; min-height: 0;
  padding-right: env(safe-area-inset-right, 0px);
  background: var(--chrome);
  border-left: 1px solid var(--hairline);
  box-shadow: var(--shadow-float);
  transform: translateX(104%);
  visibility: hidden;                    /* closed: out of sight and out of the tab order */
  transition: transform 220ms var(--ease), visibility 0s linear 220ms;
}
.nb-app[data-panel="open"] > .nb-app-panel { transform: none; visibility: visible; transition-delay: 0s; }
.nb-app-panel__tabs {
  flex: none;
  display: flex; align-items: center; gap: 20px;
  min-height: 54px; padding: 0 8px 0 24px;
  border-bottom: 1px solid var(--hairline);
}
.nb-app-panel__tablist { display: flex; align-items: center; gap: 20px; min-width: 0; }
.nb-app-panel__tab {
  min-height: var(--tap); min-width: var(--tap); padding: 0;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; color: var(--text-3);
  font: 600 14px/1 var(--font-body);
  touch-action: manipulation;
}
.nb-app-panel__tab:hover { color: var(--text); }
.nb-app-panel__tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--ink); }
.nb-app-panel__close { margin-left: auto; }
:where(.nb-app-panel) > :where(#nb-reminders-host, #nb-analyze-host) {
  flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* the shade behind the drawer and, on narrow screens, behind the panel */
.nb-app-scrim { display: none; }

/* --------------------------- dialog pieces ------------------------ */
/* a dialog of the shell never grows past the window: its body scrolls, its buttons stay in reach */
.nb-app-dialog {
  max-height: calc(100vh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)));
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)));
  max-height: calc(var(--nb-vv-h, 100dvh) - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)));
}
.nb-app-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nb-app-form .nb-segmented { display: grid; }
.nb-app-hint { font-size: var(--fs-small); line-height: 1.45; color: var(--text-2); }
.nb-app-note-line { font-size: var(--fs-small); line-height: 1.45; color: var(--text-2); }
.nb-app-note-line.is-error { color: var(--overdue); }
.nb-app-note-line.is-ok { color: var(--ok); }
.nb-app-note-line > .nb-spin { margin-right: 8px; vertical-align: -3px; }
.nb-app-form .nb-segmented__opt:disabled, .nb-app-form .nb-check input:disabled + span { opacity: 0.5; }

.nb-app-file {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center;
  padding: 14px 0;
  border-block: 1px solid var(--hairline);
}
.nb-app-file__icon {
  grid-row: span 2;
  width: 44px; height: 52px; border-radius: 4px;
  display: grid; place-items: center;
  background: var(--accent-wash); color: var(--accent);
}
.nb-app-file__name { font: 600 var(--fs-body)/1.3 var(--font-body); overflow-wrap: anywhere; align-self: end; }
.nb-app-file__meta {
  display: flex; align-items: center; gap: 8px; align-self: start; min-width: 0;
  font: 400 12px/1.35 var(--font-util); font-variant-numeric: tabular-nums; color: var(--text-3);
}
.nb-app-file__meta.is-ready { color: var(--upcoming); }
.nb-app-file__meta.is-error { color: var(--overdue); font-family: var(--font-body); font-size: var(--fs-small); }
.nb-app-file__meta > .nb-icon { flex: none; }

.nb-app-steps { display: flex; flex-direction: column; gap: 8px; }
.nb-app-step { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.nb-app-step > .nb-btn { justify-content: flex-start; }
.nb-app-step__done { display: inline-flex; align-items: center; gap: 4px; font: 500 12px/1 var(--font-util); color: var(--ok); }
.nb-app-step__text { font-size: 14px; color: var(--text); padding-left: 2px; }

/* ------------------------------ settings -------------------------- */
.nb-app-settings-body { display: flex; flex-direction: column; min-width: 0; }
.nb-app-set { display: flex; flex-direction: column; gap: 12px; padding-block: 18px; min-width: 0; }
.nb-app-set + .nb-app-set { border-top: 1px solid var(--hairline); }
.nb-app-set:first-child { padding-top: 4px; }
.nb-app-set:last-child { padding-bottom: 4px; }
.nb-app-set__title { font: 600 16px/1.25 var(--font-display); letter-spacing: -0.01em; outline-offset: 4px; border-radius: 4px; }
.nb-app-set__text { font-size: 14px; line-height: 1.5; color: var(--text-2); max-width: 62ch; }
.nb-app-set__state { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.nb-app-set__state .nb-icon { color: var(--text-3); flex: none; }
.nb-app-set__state.is-ok .nb-icon { color: var(--ok); }
.nb-app-set__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nb-app-set__group { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nb-app-set__group[hidden] { display: none; }
/* "Use your own key instead": a key of one's own, out of the way on a site with its own AI service */
.nb-app-set__more > summary { display: flex; align-items: center; gap: 8px; min-height: var(--tap); width: max-content; max-width: 100%; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; list-style: none; border-radius: 6px; }
.nb-app-set__more > summary::-webkit-details-marker { display: none; }
.nb-app-set__more > summary .nb-icon { color: var(--text-3); flex: none; transition: transform 0.15s ease; }
.nb-app-set__more[open] > summary .nb-icon { transform: rotate(90deg); }
.nb-app-set__more > .nb-app-set__group { padding-top: 4px; }
.nb-app-set .nb-segmented { display: grid; max-width: 440px; }
.nb-app-set .nb-segmented__opt { padding-inline: 8px; min-height: var(--tap); }
.nb-app-set .nb-check small { display: block; font-size: var(--fs-small); color: var(--text-3); }
.nb-app-set .nb-check { align-items: flex-start; padding-block: 8px; }
.nb-app-set .nb-check input { margin-top: 1px; }

.nb-app-hands { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.nb-app-hand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 68px; min-width: 0; padding: 10px 14px;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-m);
  background: transparent; color: var(--text);
  text-align: left;
  touch-action: manipulation;
}
.nb-app-hand:hover { background: var(--hover); }
.nb-app-hand[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--accent-wash); }
.nb-app-hand__name { font: 500 var(--fs-micro)/1 var(--font-util); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.nb-app-hand__sample { font-size: 23px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.nb-app-swatches { display: flex; flex-wrap: wrap; gap: 0; margin-left: -10px; }

/* ---------------------------- responsive -------------------------- */
@media (min-width: 1000px) {
  .nb-app[data-sidebar="closed"] { grid-template-columns: minmax(0, 1fr); }
  .nb-app[data-sidebar="closed"] > .nb-app-sidebar { display: none; }
  .nb-app[data-sidebar="closed"] > .nb-app-main { padding-left: env(safe-area-inset-left, 0px); }
}

@media (max-width: 999px) {
  .nb-app { grid-template-columns: minmax(0, 1fr); }
  .nb-app-main { grid-column: 1; padding-left: env(safe-area-inset-left, 0px); }
  .nb-app-sidebar {
    position: absolute; z-index: 30;
    top: 0; bottom: 0; left: 0;
    width: min(320px, 88%);
    border-right: 0;
    box-shadow: var(--shadow-float);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform 220ms var(--ease), visibility 0s linear 220ms;
  }
  .nb-app[data-sidebar="open"] > .nb-app-sidebar { transform: none; visibility: visible; transition-delay: 0s; }
  .nb-app-sidebar__close { display: inline-flex; }

  /* here the panel is a sheet over everything, and a press beside it closes it */
  .nb-app-panel { top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); }

  .nb-app-scrim {
    display: block;
    position: absolute; inset: 0; z-index: 20;
    background: var(--scrim);
    opacity: 0; visibility: hidden;
    transition: opacity 200ms var(--ease), visibility 0s linear 200ms;
  }
  .nb-app[data-sidebar="open"] > .nb-app-scrim,
  .nb-app[data-panel="open"] > .nb-app-scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
}

@media (max-width: 699px) {
  .nb-app-panel { width: 100%; border-left: 0; }
  .nb-app-panel__tabs { padding-left: 16px; }
  .nb-app-blank__title { font-size: 22px; }
}
