/* Folio's own styles, as defuss-shadcn v0.10.2 docs/application/app-notes.html (7ce2df8e) lines 29 to 1648 have them. */
:root { --scaffold-height: 100dvh; } html, body { height: 100%; margin: 0; } body { overflow: hidden; background: var(--background); color: var(--foreground); }
  /* Folio: the scaffold's own glue - layout and the editor look. Every control
     is a shipped component (Sidebar, Tree View, Toolbar, Context Menu, Command,
     Dropdown, Popover, Sheet, Table, Select, Switch, Badge, Avatar, Kbd,
     Toast); the editor itself is contenteditable blocks */
  .nt {
    --nt-blue: oklch(0.6 0.15 245);
    container: nt / inline-size;
    position: relative;
    display: flex;
    width: 100%;
    height: var(--scaffold-height, 50rem);
    overflow: hidden;
    background: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
  }

  /* sidebar */
  .nt .app-sidebar {
    position: relative;
    height: 100%;
    flex: none;
  }
  .nt-sb-head {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  .nt-ws {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.3125rem 0.375rem;
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    &:hover {
      background: var(--sidebar-accent);
    }
    &:focus-visible {
      outline: 2px solid var(--sidebar-ring);
      outline-offset: -2px;
    }
    & > svg {
      width: 0.875rem;
      height: 0.875rem;
      color: var(--muted-foreground);
    }
  }
  .nt-locale {
    margin-block-end: 0.375rem;
  }
  .nt-sidebar[data-state='collapsed'] :is(.nt-locale, .nt-saved) {
    display: none;
  }
  .nt-ws-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nt-logo {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 0.375rem;
    background: var(--foreground);
    color: var(--background);
  }
  .nt .sidebar-link {
    width: 100%;
    border: 0;
    background: none;
    font: inherit;
    text-align: start;
    cursor: pointer;
  }
  .nt-kbd {
    margin-inline-start: auto;
  }
  .nt-tree {
    margin: 0;
    padding: 0;
    & .tree-leaf,
    & .tree-branch-trigger {
      gap: 0.375rem;
      color: inherit;
      text-decoration: none;
    }
  }
  .nt-tree-icon {
    display: inline-grid;
    place-items: center;
    width: 1.25rem;
    flex: none;
    font-size: 0.9375rem;
  }
  .nt-add-page {
    color: var(--muted-foreground);
  }
  .nt-expand {
    position: absolute;
    top: 0.625rem;
    left: 0.5rem;
    z-index: 2;
    display: none;
  }
  .nt:has(#nt-sidebar[data-state='collapsed']) {
    & #nt-sidebar {
      display: none;
    }
    & .nt-expand {
      display: inline-flex;
    }
    & .nt-top {
      padding-inline-start: 3rem;
    }
  }

  /* pages: the route's page is shown, the others are hidden */
  .nt-main {
    flex: 1;
    min-width: 0;
  }
  .nt-pages {
    height: 100%;
  }
  .nt-page {
    display: none;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  .nt-page:not([hidden]) {
    display: flex;
    animation: nt-in 180ms ease both;
  }
  @keyframes nt-in {
    from {
      opacity: 0;
    }
  }
  .nt-top {
    display: flex;
    flex: none;
    align-items: center;
    gap: 0.25rem;
    height: 2.75rem;
    padding-inline: 0.75rem;
  }
  .nt-top .breadcrumb {
    min-width: 0;
    overflow: hidden;
  }
  .nt-top .breadcrumb-list {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .nt-spacer {
    flex: 1;
  }
  /* filtered, trashed: hidden wins over any display the parts set */
  .nt [hidden] {
    display: none !important;
  }
  .nt-muted,
  .nt-edited {
    color: var(--muted-foreground);
  }
  .nt-edited {
    margin-inline-end: 0.25rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }
  .nt-mobile-trigger {
    display: none;
  }
  .nt-star[aria-pressed='true'] {
    color: oklch(0.78 0.16 80);
    & svg {
      fill: currentColor;
    }
  }
  .nt-danger {
    color: var(--destructive);
  }
  .nt-trashed {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: color-mix(in oklab, var(--destructive) 85%, black);
    color: #fff;
    font-size: 0.8125rem;
    & svg {
      width: 1rem;
      height: 1rem;
    }
  }
  .nt-page[data-trashed] .nt-trashed {
    display: flex;
  }
  .nt-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nt-cover {
    position: relative;
    height: clamp(8rem, 28cqi, 15rem);
    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .nt-cover-actions {
    position: absolute;
    right: clamp(1rem, 8cqi, 6rem);
    bottom: 0.75rem;
    opacity: 0;
    transition: opacity 150ms ease;
  }
  .nt-cover:hover .nt-cover-actions,
  .nt-cover:focus-within .nt-cover-actions {
    opacity: 1;
  }
  .nt-doc {
    --nt-w: 44rem;
    position: relative;
    width: min(var(--nt-w), 100% - 2 * clamp(1.5rem, 8cqi, 6rem));
    margin-inline: auto;
    padding-block: 1.5rem 30vh;
  }
  .nt-page[data-full] .nt-doc {
    --nt-w: 100%;
  }
  .nt-page[data-small] .nt-doc {
    font-size: 0.8125rem;
  }
  .nt-page[data-font='serif'] .nt-doc {
    font-family: var(--font-serif);
  }
  .nt-page[data-font='mono'] .nt-doc {
    font-family: var(--font-mono);
  }
  .nt-cover + .nt-doc {
    padding-block-start: 0;
  }
  .nt-doc-actions {
    display: flex;
    gap: 0.25rem;
    min-height: 2rem;
    margin-block-end: 0.25rem;
    opacity: 0;
    transition: opacity 150ms ease;
    & .btn {
      color: var(--muted-foreground);
    }
  }
  .nt-doc:hover .nt-doc-actions,
  .nt-doc-actions:focus-within {
    opacity: 1;
  }
  .nt-cover + .nt-doc .nt-doc-actions {
    position: absolute;
    top: 0.5rem;
    left: 6rem;
  }
  .nt-icon {
    display: block;
    margin-block-end: 0.5rem;
    padding: 0.25rem;
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    font-size: 4.25rem;
    line-height: 1;
    cursor: pointer;
    &:hover {
      background: var(--muted);
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
    }
  }
  .nt-cover + .nt-doc .nt-icon {
    margin-block-start: -2.75rem;
    position: relative;
  }
  .nt-title {
    margin: 0 0 0.75rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    outline: none;
  }
  .nt-page[data-small] .nt-title {
    font-size: 2rem;
  }
  [contenteditable][data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: color-mix(in oklch, var(--muted-foreground) 60%, transparent);
    pointer-events: none;
  }
  .nt-starter {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.125rem;
    margin-block-end: 1rem;
    color: var(--muted-foreground);
    & p {
      margin: 0 0 0.5rem;
      grid-column: 1 / -1;
    }
    & button {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.375rem 0.5rem;
      border: 0;
      border-radius: var(--radius-md);
      background: none;
      color: inherit;
      font: inherit;
      cursor: pointer;
    }
    & button:hover,
    & button:focus-visible {
      background: var(--muted);
      color: var(--foreground);
      outline: none;
    }
    & svg {
      width: 1rem;
      height: 1rem;
    }
  }

  /* blocks */
  .nt-blocks {
    counter-reset: nt-n;
  }
  .nt-block {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.375rem;
    margin-block: 1px;
    padding: 0.1875rem 0.125rem;
    border-radius: var(--radius-sm);
  }
  .nt-text {
    flex: 1;
    min-width: 0;
    min-height: 1.5em;
    line-height: 1.6;
    outline: none;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    & code {
      padding: 0.0625rem 0.3125rem;
      border-radius: 0.25rem;
      background: color-mix(in oklch, var(--muted) 90%, var(--foreground) 4%);
      color: oklch(0.6 0.19 25);
      font-family: var(--font-mono);
      font-size: 0.85em;
    }
    & mark {
      padding: 0 0.125rem;
      border-radius: 0.1875rem;
      background: oklch(0.92 0.12 95);
      color: inherit;
    }
    & a {
      color: inherit;
    }
  }
  .dark .nt-text mark {
    background: oklch(0.45 0.09 95);
  }
  .nt-text[data-placeholder]:empty::before {
    content: none;
  }
  .nt-text:focus:empty::before,
  .nt-block:is(
      [data-type='h1'],
      [data-type='h2'],
      [data-type='h3'],
      [data-type='toggle'],
      [data-type='todo'],
      [data-type='bullet'],
      [data-type='number'],
      [data-type='quote'],
      [data-type='callout'],
      [data-type='code']
    )
    > .nt-text:empty::before {
    content: attr(data-placeholder);
    color: color-mix(in oklch, var(--muted-foreground) 60%, transparent);
  }
  .nt-block[data-type='h1'] {
    margin-block-start: 1.5rem;
    & > .nt-text {
      font-size: 1.875em;
      font-weight: 700;
      line-height: 1.3;
    }
  }
  .nt-block[data-type='h2'] {
    margin-block-start: 1.25rem;
    & > .nt-text {
      font-size: 1.5em;
      font-weight: 650;
      line-height: 1.3;
    }
  }
  .nt-block[data-type='h3'] {
    margin-block-start: 0.75rem;
    & > .nt-text {
      font-size: 1.25em;
      font-weight: 600;
      line-height: 1.3;
    }
  }
  .nt-check {
    margin-block-start: 0.25em;
  }
  .nt-block[data-type='todo']:has(> .nt-check:checked) > .nt-text {
    color: var(--muted-foreground);
    text-decoration: line-through;
  }
  .nt-block[data-type='bullet']::before {
    content: '•';
    width: 1.25rem;
    flex: none;
    text-align: center;
    font-size: 1.25em;
    line-height: 1.3;
  }
  .nt-block[data-type='number'] {
    counter-increment: nt-n;
  }
  :not(.nt-block[data-type='number']) + .nt-block[data-type='number'],
  .nt-block[data-type='number']:first-child {
    counter-reset: nt-n;
    counter-increment: nt-n;
  }
  .nt-block[data-type='number']::before {
    content: counter(nt-n) '.';
    min-width: 1.25rem;
    flex: none;
    text-align: end;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
  }
  .nt-arrow {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    margin-block-start: 0.0625rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: inherit;
    cursor: pointer;
    &::before {
      content: '';
      width: 0.75rem;
      height: 0.75rem;
      background: currentColor;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E")
        center / contain no-repeat;
      transition: rotate 150ms ease;
    }
    &[aria-expanded='true']::before {
      rotate: 90deg;
    }
    &:hover {
      background: var(--muted);
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
    }
  }
  .nt-children {
    flex-basis: 100%;
    padding-inline-start: 1.625rem;
  }
  .nt-block[data-type='toggle']:not([data-open]) > .nt-children {
    display: none;
  }
  .nt-block[data-type='quote'] > .nt-text {
    padding-inline-start: 0.875rem;
    border-inline-start: 3px solid currentColor;
    font-size: 1.1em;
  }
  .nt-block[data-type='callout'] {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: color-mix(in oklch, var(--muted) 75%, transparent);
  }
  .nt-emoji {
    font-size: 1.25rem;
    line-height: 1.2;
  }
  .nt-block[data-type='divider'] {
    padding-block: 0.625rem;
    & > .nt-text {
      display: none;
    }
    &::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }
  }
  .nt-block[data-type='code'] > .nt-text {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: color-mix(in oklch, var(--muted) 80%, transparent);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.7;
    tab-size: 2;
  }
  .nt-figure {
    flex: 1;
    margin: 0.25rem 0;
    & img {
      display: block;
      width: 100%;
      border-radius: var(--radius-md);
    }
    & figcaption {
      margin-block-start: 0.375rem;
      color: var(--muted-foreground);
      font-size: 0.8125rem;
    }
  }
  /* the component blocks: a hint (Alert), an image, a table (Table), milestones (Timeline), a roadmap database */
  .nt-figure {
    position: relative;
  }
  .nt-image-empty {
    display: grid;
    place-items: center;
    min-height: 7rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in oklch, var(--muted) 50%, transparent);
  }
  .nt-image-actions {
    position: absolute;
    inset-block-start: 0.5rem;
    inset-inline-end: 0.5rem;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .nt-figure:is(:hover, :focus-within) .nt-image-actions {
    opacity: 1;
  }
  .nt-image-pick {
    width: 21rem;
    padding: 0.5rem;
    & .nt-menu-heading {
      margin: 0.25rem 0.25rem 0.375rem;
    }
    & form {
      display: flex;
      gap: 0.375rem;
      margin-block-end: 0.5rem;
    }
  }
  .nt-image-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.375rem;
    & button {
      padding: 0;
      border: 0;
      border-radius: var(--radius-sm);
      background: none;
      cursor: pointer;
      overflow: hidden;
    }
    & img {
      display: block;
      width: 100%;
      aspect-ratio: 16 / 10;
      object-fit: cover;
    }
    & button:hover img,
    & button:focus-visible img {
      outline: 2px solid var(--ring);
      outline-offset: -2px;
    }
  }
  .nt-upload {
    position: relative;
    margin-block-end: 0.5rem;
    cursor: pointer;
    & input {
      position: absolute;
      inset: 0;
      opacity: 0;
      cursor: pointer;
    }
    &:has(input:focus-visible) {
      outline: 2px solid var(--ring);
    }
  }
  .nt-block[data-type='hint'] > .nt-hint {
    flex: 1;
    min-width: 0;
    margin-block: 0.25rem;
    & .alert-description {
      margin-block-start: 0.125rem;
      color: var(--foreground);
      font-size: 0.875rem;
    }
  }
  .nt-hint[data-tone='note'] {
    border-color: color-mix(in oklab, var(--nt-blue) 45%, var(--border));
    background: color-mix(in oklab, var(--nt-blue) 6%, var(--background));
    & :is(.alert-icon, .alert-title) {
      color: var(--nt-blue);
    }
  }
  /* literal greens and ambers (the theme has no success or warning token), mixed in oklab: an oklch mix with a
     white background turned the green pink */
  .nt-hint[data-tone='tip'] {
    border-color: color-mix(in oklab, oklch(0.6 0.15 150) 45%, var(--border));
    background: color-mix(in oklab, oklch(0.6 0.15 150) 6%, var(--background));
    & :is(.alert-icon, .alert-title) {
      color: oklch(0.55 0.15 150);
    }
  }
  .nt-hint[data-tone='warning'] {
    border-color: color-mix(in oklab, oklch(0.75 0.16 75) 60%, var(--border));
    background: color-mix(in oklab, oklch(0.75 0.16 75) 8%, var(--background));
    & :is(.alert-icon, .alert-title) {
      color: oklch(0.58 0.14 65);
    }
  }
  .dark .nt-hint[data-tone='tip'] :is(.alert-icon, .alert-title) {
    color: oklch(0.75 0.15 150);
  }
  .dark .nt-hint[data-tone='warning'] :is(.alert-icon, .alert-title) {
    color: oklch(0.8 0.15 75);
  }
  .nt-hint[data-tone='caution'] {
    background: color-mix(in oklab, var(--destructive) 6%, var(--background));
    & .alert-description {
      opacity: 1;
      color: var(--foreground);
    }
  }
  .nt-part {
    flex: 1;
    min-width: 0;
    margin-block: 0.25rem;
  }
  .nt-part-actions {
    display: flex;
    gap: 0.25rem;
    margin-block-start: 0.25rem;
    opacity: 0.6;
    &:is(:hover, :focus-within) {
      opacity: 1;
    }
  }
  .nt-table .table-container {
    overflow-x: auto;
  }
  .nt-table :is(.table-head, .table-cell) {
    min-width: 7rem;
    border-inline-end: 1px solid var(--border);
    vertical-align: top;
    &:last-child {
      border-inline-end: 0;
    }
    &:focus {
      outline: 2px solid var(--ring);
      outline-offset: -2px;
    }
  }
  .nt-milestones .timeline {
    padding-block: 0.25rem;
  }
  .nt-milestones .timeline-dot {
    padding: 0;
    border: 0;
    cursor: pointer;
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }
  }
  .nt-milestones :is(.timeline-title, .timeline-time) {
    min-height: 1lh;
    outline: none;
  }
  .nt-block[data-type='db'] > .nt-db {
    flex: 1;
    min-width: 0;
  }
  .nt-block-menu[data-kind='part'] :is([data-turn], .nt-turn) {
    display: none;
  }
  .nt-block-menu[data-kind='db'] :is([data-turn], .nt-turn, [data-act='dup']) {
    display: none;
  }
  .nt-pagelink {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: color-mix(in oklch, currentColor 30%, transparent);
    text-underline-offset: 3px;
    &:hover {
      background: var(--muted);
    }
  }
  .nt-grip-hint {
    color: var(--muted-foreground);
    letter-spacing: -0.15em;
  }

  /* the gutter: + and ⋮⋮ appear on hover */
  .nt-gutter {
    position: absolute;
    top: 0.25rem;
    right: 100%;
    display: flex;
    gap: 0.0625rem;
    padding-inline-end: 0.25rem;
    opacity: 0;
    transition: opacity 120ms ease;
  }
  .nt-block:hover:not(:has(.nt-block:hover)) > .nt-gutter,
  .nt-gutter:focus-within {
    opacity: 1;
  }
  .nt-block:is([data-type='h1'], [data-type='h2']) > .nt-gutter {
    top: 0.5rem;
  }
  .nt-add,
  .nt-grip {
    display: grid;
    place-items: center;
    width: 1.375rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--muted-foreground);
    cursor: pointer;
    &::before {
      content: '';
      width: 1rem;
      height: 1rem;
      background: currentColor;
      mask: var(--nt-glyph) center / contain no-repeat;
    }
    &:hover {
      background: var(--muted);
      color: var(--foreground);
    }
  }
  .nt-add {
    --nt-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  }
  .nt-grip {
    --nt-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cg fill='black'%3E%3Ccircle cx='3' cy='3' r='1.4'/%3E%3Ccircle cx='7' cy='3' r='1.4'/%3E%3Ccircle cx='3' cy='8' r='1.4'/%3E%3Ccircle cx='7' cy='8' r='1.4'/%3E%3Ccircle cx='3' cy='13' r='1.4'/%3E%3Ccircle cx='7' cy='13' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
    width: 1.125rem;
    cursor: grab;
    &::before {
      width: 0.625rem;
    }
  }
  .nt-block[data-drop='before'] {
    box-shadow: 0 -2px 0 color-mix(in oklch, var(--nt-blue) 70%, transparent);
  }
  .nt-block[data-drop='after'] {
    box-shadow: 0 2px 0 color-mix(in oklch, var(--nt-blue) 70%, transparent);
  }
  .nt-block[data-dragging] {
    opacity: 0.4;
  }
  .nt-block[data-selected] {
    background: color-mix(in oklch, var(--nt-blue) 14%, transparent);
  }

  /* floating format bar + menus */
  .nt-format {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    overflow: visible;
    & .toolbar {
      box-shadow: var(--shadow-lg);
    }
  }
  .nt-slash,
  .nt-block-menu {
    width: 18rem;
    max-height: min(22rem, 70vh);
    overflow-y: auto;
  }
  .nt-block-menu {
    width: 13rem;
    & .context-menu-item {
      gap: 0.625rem;
    }
    & svg {
      width: 0.875rem;
      height: 0.875rem;
    }
  }
  .nt-menu-heading {
    margin: 0.375rem 0.5rem 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.6875rem;
    font-weight: 600;
  }
  .nt-slash-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    & > span:last-child {
      display: grid;
      text-align: start;
    }
    & strong {
      font-weight: 500;
    }
    & small {
      color: var(--muted-foreground);
      font-size: 0.6875rem;
    }
    &[hidden] {
      display: none;
    }
    &[data-active] {
      background: var(--accent);
      color: var(--accent-foreground);
    }
  }
  .nt-slash-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    & svg {
      width: 1.125rem;
      height: 1.125rem;
    }
  }
  .nt-slash-empty {
    display: none;
    margin: 0.5rem;
    color: var(--muted-foreground);
  }
  .nt-slash:not(:has(.nt-slash-item:not([hidden]))) .nt-slash-empty {
    display: block;
  }

  .nt-share {
    width: 24rem;
    padding: 0.75rem;
    gap: 0.75rem;
    /* only while open: a display on the closed popover beats the browser's hiding, and the closed (transparent)
       panel took the clicks at the top right of every page */
    &:popover-open {
      display: grid;
    }
  }
  .nt-share-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    & .nt-muted {
      font-size: 0.75rem;
    }
  }
  .nt-share-invite {
    display: flex;
    gap: 0.5rem;
    & .input {
      flex: 1;
      height: 2rem;
    }
  }
  .nt-share-people {
    margin: 0;
    padding: 0;
    list-style: none;
    & li {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 0.625rem;
      font-size: 0.8125rem;
    }
    & li > span:nth-child(2) {
      display: grid;
    }
    & small {
      color: var(--muted-foreground);
    }
  }
  .nt-share-web {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block-start: 0.75rem;
    border-block-start: 1px solid var(--border);
    cursor: pointer;
    & > span {
      display: flex;
      align-items: center;
      gap: 0.625rem;
    }
    & > span > span {
      display: grid;
    }
    & svg {
      width: 1.125rem;
      height: 1.125rem;
      color: var(--muted-foreground);
    }
    & small {
      color: var(--muted-foreground);
      font-size: 0.75rem;
    }
  }
  .nt-share-foot {
    display: flex;
    justify-content: flex-end;
  }
  .nt-blue {
    background: var(--nt-blue);
    color: #fff;
    &:hover {
      background: color-mix(in oklab, var(--nt-blue) 85%, black);
    }
  }
  .nt-emojis {
    width: 17rem;
    padding: 0.5rem;
  }
  .nt-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.125rem;
    & button {
      display: grid;
      place-items: center;
      aspect-ratio: 1;
      padding: 0;
      border: 0;
      border-radius: var(--radius-md);
      background: none;
      font-size: 1.25rem;
      cursor: pointer;
    }
    & button:hover,
    & button:focus-visible {
      background: var(--accent);
      outline: none;
    }
  }
  .nt-trash {
    width: 18rem;
    padding: 0.5rem;
    & ul {
      display: grid;
      gap: 0.125rem;
      margin: 0;
      padding: 0;
      list-style: none;
    }
    & li {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.25rem 0.375rem;
      border-radius: var(--radius-md);
    }
    & li:hover {
      background: var(--muted);
    }
    & li > span {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  .nt-trash-empty {
    margin: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
  }
  .nt-trash:has(li) .nt-trash-empty {
    display: none;
  }

  /* the database */
  .nt-db-block {
    display: block;
    padding: 0;
  }
  .nt-db {
    display: grid;
    gap: 0.5rem;
    margin-block: 0.75rem;
  }
  .nt-db-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-block-end: 0.5rem;
    border-block-end: 1px solid var(--border);
  }
  .nt-db-views {
    display: flex;
    gap: 0.125rem;
    & label {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      padding: 0.3125rem 0.5rem;
      border-radius: var(--radius-md);
      color: var(--muted-foreground);
      font-weight: 500;
      cursor: pointer;
    }
    & input {
      position: absolute;
      inset: 0;
      margin: 0;
      opacity: 0;
      cursor: pointer;
    }
    & svg {
      width: 0.9375rem;
      height: 0.9375rem;
    }
    & label:hover {
      background: var(--muted);
    }
    & label:has(:checked) {
      color: var(--foreground);
      box-shadow: inset 0 -2px 0 var(--foreground);
      border-radius: 0;
    }
    & label:has(:focus-visible) {
      outline: 2px solid var(--ring);
    }
  }
  .nt-db-search {
    position: relative;
    & svg {
      position: absolute;
      inset-inline-start: 0.5rem;
      top: 50%;
      translate: 0 -50%;
      width: 0.875rem;
      height: 0.875rem;
      color: var(--muted-foreground);
      pointer-events: none;
    }
    & .input {
      width: 11rem;
      height: 1.875rem;
      padding-inline-start: 1.75rem;
      font-size: 0.8125rem;
    }
  }
  .nt-db-board,
  .nt-db-gallery {
    display: none;
  }
  .nt-db:has(input[value='board']:checked) {
    & .nt-db-table {
      display: none;
    }
    & .nt-db-board {
      display: grid;
    }
  }
  .nt-db:has(input[value='gallery']:checked) {
    & .nt-db-table {
      display: none;
    }
    & .nt-db-gallery {
      display: grid;
    }
  }
  .nt-db-table .table {
    font-size: 0.8125rem;
  }
  .nt-db-table :is(th, td) {
    white-space: nowrap;
    text-align: start;
  }
  .nt-db-table thead th {
    color: var(--muted-foreground);
    font-weight: 500;
    & svg {
      width: 0.875rem;
      height: 0.875rem;
      margin-inline-end: 0.375rem;
      vertical-align: -0.125rem;
    }
  }
  .nt-db-open {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    & > svg {
      width: 1rem;
      height: 1rem;
      color: var(--muted-foreground);
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
      border-radius: 0.25rem;
    }
  }
  .nt-open-hint {
    padding: 0.0625rem 0.375rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0;
  }
  tr:hover .nt-open-hint,
  .nt-db-open:focus-visible .nt-open-hint {
    opacity: 1;
  }
  .nt-person {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    & .avatar {
      width: 1.25rem;
      height: 1.25rem;
    }
  }
  .nt-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .nt-tag {
    border-radius: 0.25rem;
    font-weight: 500;
    background: var(--nt-tag, var(--muted));
    color: var(--foreground);
  }
  [data-tag='editor'] {
    --nt-tag: oklch(0.9 0.05 245);
  }
  [data-tag='sync'] {
    --nt-tag: oklch(0.9 0.06 300);
  }
  [data-tag='api'] {
    --nt-tag: oklch(0.9 0.07 150);
  }
  [data-tag='mobile'] {
    --nt-tag: oklch(0.92 0.07 75);
  }
  [data-tag='ai'] {
    --nt-tag: oklch(0.9 0.07 20);
  }
  .dark [data-tag] {
    --nt-tag: color-mix(in oklab, var(--muted) 70%, var(--nt-tag-dark, var(--muted-foreground)));
  }
  /* statuses: grey, blue, green */
  [data-status='todo'],
  [data-s='todo'] {
    --nt-s: oklch(0.6 0.01 260);
  }
  [data-status='doing'],
  [data-s='doing'] {
    --nt-s: oklch(0.6 0.15 245);
  }
  [data-status='done'],
  [data-s='done'] {
    --nt-s: oklch(0.62 0.15 150);
  }
  .nt-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.0625rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--nt-s, var(--muted-foreground)) 16%, transparent);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    &::before {
      content: '';
      width: 0.4375rem;
      height: 0.4375rem;
      border-radius: 50%;
      background: var(--nt-s, var(--muted-foreground));
    }
  }
  .nt-status {
    width: auto;
    height: 1.625rem;
    padding-block: 0;
    border-color: transparent;
    border-radius: 999px;
    background-color: color-mix(in oklab, var(--nt-s) 16%, transparent);
    box-shadow: none;
    font-size: 0.75rem;
    font-weight: 500;
  }
  .nt-db-add {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.4375rem 0.5rem;
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    color: var(--muted-foreground);
    font: inherit;
    font-size: 0.8125rem;
    text-align: start;
    cursor: pointer;
    & svg {
      width: 0.875rem;
      height: 0.875rem;
    }
    &:hover {
      background: var(--muted);
      color: var(--foreground);
    }
  }
  .nt-db-board {
    grid-template-columns: repeat(3, minmax(14rem, 1fr));
    gap: 0.75rem;
    overflow-x: auto;
  }
  .nt-col {
    display: grid;
    align-content: start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    background: color-mix(in oklab, var(--nt-s) 6%, transparent);
    transition: box-shadow 150ms ease;
    & header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.125rem 0.25rem;
    }
    &[data-over] {
      box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--nt-s) 60%, transparent);
    }
  }
  .nt-count {
    color: var(--muted-foreground);
    font-size: 0.75rem;
  }
  .nt-cards {
    display: grid;
    gap: 0.5rem;
    min-height: 2.5rem;
  }
  .nt-card,
  .nt-gcard {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--card-foreground);
    box-shadow: var(--shadow-2xs);
    font: inherit;
    text-align: start;
    cursor: pointer;
    &:hover {
      background: color-mix(in oklch, var(--muted) 40%, var(--card));
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 1px;
    }
    &[data-dragging] {
      opacity: 0.45;
    }
  }
  .nt-card {
    cursor: grab;
  }
  .nt-card-name {
    font-weight: 600;
  }
  .nt-db-gallery {
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 0.75rem;
  }
  .nt-gcard {
    padding: 0;
    overflow: hidden;
    & img {
      width: 100%;
      height: 7.5rem;
      object-fit: cover;
    }
  }
  .nt-gcard-body {
    display: grid;
    justify-items: start;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem 0.75rem;
  }

  /* the peek */
  .nt-peek {
    width: min(36rem, 100%);
  }
  .nt-peek-body {
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 2.5rem 2rem;
  }
  .nt-peek-title {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    outline: none;
  }
  .nt-props {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    & > div {
      display: grid;
      grid-template-columns: 8rem minmax(0, 1fr);
      align-items: center;
      min-height: 2.125rem;
    }
    & dt {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: var(--muted-foreground);
      font-size: 0.8125rem;
      & svg {
        width: 0.9375rem;
        height: 0.9375rem;
      }
    }
    & dd {
      margin: 0;
    }
    & .select:not(.nt-status),
    & .input {
      width: auto;
      height: 1.875rem;
      border-color: transparent;
      background-color: transparent;
      box-shadow: none;
      font-size: 0.8125rem;
    }
    & .select:not(.nt-status):hover,
    & .input:hover {
      border-color: var(--border);
    }
  }
  .nt-peek-text {
    min-height: 6rem;
    padding-block-start: 1rem;
    border-block-start: 1px solid var(--border);
    line-height: 1.65;
    outline: none;
  }

  @container nt (max-width: 44rem) {
    .nt .app-sidebar,
    .nt .nt-expand {
      display: none;
    }
    .nt-mobile-trigger {
      display: inline-flex;
    }
    .nt-edited,
    .nt-doc-actions {
      display: none;
    }
    .nt-doc {
      width: calc(100% - 2.5rem);
    }
    .nt-title {
      font-size: 2rem;
    }
    .nt-gutter {
      display: none;
    }
    .nt-db-board {
      grid-template-columns: repeat(3, 15rem);
    }
    .nt-db-search .input {
      width: 8rem;
    }
  }
  /* storage: the stored workspace replaces the sample before anyone sees it - at most 3 s, then the sample shows */
  .nt[data-nt-store='loading'] .nt-pages {
    visibility: hidden;
    animation: nt-reveal 0s 3s forwards;
  }
  @keyframes nt-reveal {
    to {
      visibility: visible;
    }
  }
  .nt-saved {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0 0 0.375rem;
    padding-inline: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    &::before {
      content: '';
      flex: none;
      width: 0.4375rem;
      height: 0.4375rem;
      border-radius: 50%;
      background: oklch(0.65 0.15 150);
    }
    &[data-state='saving']::before {
      background: var(--muted-foreground);
    }
    &:is([data-state='memory'], [data-state='error'])::before {
      background: oklch(0.75 0.16 70);
    }
    &:empty {
      display: none;
    }
  }

  /* search: hits ranked by defuss-search - the page, the section, a snippet and how each was found */
  .nt .nt-hit {
    align-items: flex-start;
    & > .nt-hit-icon {
      flex: none;
      width: 1.25rem;
      text-align: center;
    }
  }
  .nt-hit-main {
    display: grid;
    flex: 1;
    gap: 0.125rem;
    min-width: 0;
  }
  .nt-hit-title {
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
    & small {
      color: var(--muted-foreground);
      font-weight: 400;
    }
  }
  .nt-hit-snippet {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    & mark {
      border-radius: 2px;
      background: oklch(0.9 0.13 95 / 0.65);
      color: inherit;
    }
  }
  .dark .nt-hit-snippet mark {
    background: oklch(0.55 0.11 95 / 0.55);
  }
  .nt-hit-via {
    display: flex;
    flex: none;
    gap: 0.25rem;
  }
  .nt-find-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    padding: 0.5rem 0.75rem;
    border-block-start: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 0.75rem;
    &:has(> span:empty):has(> button[hidden]) {
      display: none;
    }
  }
  .nt .nt-flash {
    animation: nt-flash 1.6s ease-out;
  }
  @keyframes nt-flash {
    from {
      background: oklch(0.9 0.13 95 / 0.65);
    }
  }

  /* Settings */
  .nt-set {
    display: grid;
    gap: 1.25rem;
    & section {
      display: grid;
      gap: 0.5rem;
    }
    & h3 {
      margin: 0;
      font-size: 0.875rem;
      font-weight: 600;
    }
    & p {
      margin: 0;
      color: var(--muted-foreground);
      font-size: 0.8125rem;
      &:empty {
        display: none;
      }
    }
  }
  .nt-set-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  @media (prefers-reduced-motion: reduce) {
    .nt .nt-flash {
      animation: none;
      outline: 2px solid var(--ring);
    }
    .nt-page:not([hidden]) {
      animation: none;
    }
    .nt-arrow::before,
    .nt-gutter,
    .nt-cover-actions,
    .nt-doc-actions {
      transition: none;
    }
  }
  @media (forced-colors: active) {
    .nt-add::before,
    .nt-grip::before,
    .nt-arrow::before {
      background: ButtonText;
    }
    .nt-block[data-drop] {
      outline: 2px solid Highlight;
    }
  }

/* This app's additions to the scaffold: the sign-in screen before the workspace. */
.nt-signin { display: grid; place-items: center; height: 100dvh; padding: 1rem; }
.nt-signin[hidden] { display: none; }
.nt-signin-card { display: grid; gap: 1rem; width: min(24rem, 100%); padding: 1.5rem; }
.nt-signin-card h1 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.nt-signin-field { display: grid; gap: 0.375rem; font-size: 0.875rem; }
.nt-signin-error { margin: 0; color: var(--destructive); font-size: 0.875rem; }
.nt[hidden] { display: none !important; }
