/* Notes page, ported from Command Notes. Tokens are scoped so they do not change the rest of the app. */
.nt-page, .sheet.ntsheet, .nt-portal {
  --bg: #f6f7f8;
  --card: #ffffff;
  --surface: #fff;
  --surface-tint: #f4f8f9;
  --surface-zebra: #fbfcfc;
  --fill-muted: #eef0f2;
  --bar-track: #e7e9ec;
  --ink: #101317;
  --ink-body: #2b3036;
  --muted: #69717b;
  --faint: #9aa1a9;
  --nt-meta: #69717b;
  --line: #e7e9ec;
  --line-strong: #d9dce0;
  --line-sage: #e7e9ec;
  --accent: #1f6178;
  --accent-soft: #e7f0f3;
  --teal: #1f6178;
  --sage: #e7f0f3;
  --sage-2: #cfe2e8;
  --danger-ink: #8a1c1c;
  --radius: 12px;
  --text-lg: 17px;
  --text-md: 15px;
  --text-sm: 13px;
  --text-xs: 12px;
  --weight-semibold: 600;
  --label-track: .04em;
  --nt-fs: 15px;
  --nt-line2: #e7e9ec;
  color: var(--ink);
}
.nt-page { padding: 0 0 48px; min-height: 40vh; }
.nt-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title add" "sub add" "hint hint";
  align-items: end;
  gap: 8px 16px;
  margin: 0 0 16px;
}
.nt-head .page-title, .nt-head h1 { grid-area: title; margin: 0; font-size: 28px; letter-spacing: -.03em; }
.nt-sub { grid-area: sub; color: var(--nt-meta); font-size: 15px; font-weight: 500; margin: 0; }
.nt-filehint { grid-area: hint; font-size: 12.5px; color: var(--muted); margin: 4px 0 0; line-height: 1.4; max-width: 44rem; }
.nt-split { grid-area: add; position: relative; display: inline-flex; flex-wrap: nowrap; gap: 0; }
.nt-split-main, .nt-split-caret {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; border: 1px solid var(--teal); background: var(--teal); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.nt-split-main { padding: 0 14px; border-radius: 10px 0 0 10px; }
.nt-split-caret { width: 36px; padding: 0; border-radius: 0 10px 10px 0; border-left-color: rgba(255,255,255,.35); }
.nt-split-main svg, .nt-split-caret svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; flex: none; }
.nt-split-main:hover, .nt-split-caret:hover { background: #184e60; }
.nt-addmenu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 260px; background: #fff; border: 1px solid var(--line-strong);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(16,19,23,.16); padding: 6px; overflow: hidden;
}
.nt-addmenu-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 10px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink);
}
.nt-addmenu-item:hover { background: var(--fill-muted); }
.nt-addmenu-item.is-off { opacity: .7; cursor: default; }
.nt-addmenu-ic { width: 28px; height: 28px; display: grid; place-items: center; color: var(--teal); flex: none; }
.nt-addmenu-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.nt-addmenu-text { display: flex; flex-direction: column; gap: 1px; font-weight: 600; font-size: 14px; }
.nt-addmenu-text small { font-weight: 500; color: var(--muted); font-size: 12px; }
.nt-seg { display: inline-flex; background: var(--fill-muted); border-radius: 10px; padding: 3px; gap: 2px; margin-bottom: 10px; }
.nt-seg button {
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.nt-seg button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.nt-seg .nt-count { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 6px; margin-left: 4px; }
.nt-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.nt-search {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0 12px;
  height: 44px; color: var(--muted); flex: 1 1 260px; min-width: 0;
}
.nt-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nt-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.nt-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.nt-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; min-width: 44px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.nt-iconbtn.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.nt-iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.nt-iconbtn .nt-count { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 6px; }
.nt-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .nt-grid { grid-template-columns: 340px minmax(0,1fr); }
  .nt-back { display: none !important; }
}
@media (max-width: 899px) {
  .nt-grid.has-open .nt-list-col { display: none; }
  .nt-grid:not(.has-open) .nt-pane-col { display: none; }
}
.nt-list { display: flex; flex-direction: column; gap: 8px; }
.nt-grp { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 8px 2px 0; }
.nt-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.nt-card:hover { border-color: var(--line-strong); }
.nt-card.is-open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nt-card.is-pinned { background: var(--surface-tint); }
.nt-card-top { display: flex; align-items: center; gap: 6px; }
.nt-card-title { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-card-date { color: var(--muted); font-size: 12px; flex: none; }
.nt-pin { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; }
.nt-card-snip { color: var(--muted); font-size: 13px; margin: 6px 0 8px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-card-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nt-tag { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 8px; }
.nt-kind { margin-left: auto; font-size: 11px; color: var(--faint); font-weight: 600; }
.nt-empty { color: var(--muted); text-align: center; padding: 36px 16px; }
.nt-pane { background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-height: 280px; padding: 16px 18px 28px; }
.nt-edhead { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; }
.nt-title {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit;
  font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); width: 100%; resize: none; padding: 0;
}
.nt-round {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.nt-round svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.nt-round.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.nt-round.danger:hover { color: var(--danger-ink); border-color: #f0c4c4; }
.nt-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; align-items: center; }
.nt-type, .nt-chip {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 99px;
  padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.nt-type.is-on, .nt-chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.nt-blocks { display: flex; flex-direction: column; gap: 8px; }
.nt-text, .nt-check input[type="text"], .nt-linkin {
  width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink-body); line-height: 1.5;
}
.nt-text { min-height: 120px; resize: vertical; }
.nt-check { display: flex; align-items: flex-start; gap: 8px; }
.nt-check input[type="checkbox"] { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.nt-check.is-done input[type="text"] { text-decoration: line-through; color: var(--muted); }
.nt-linkrow { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
.nt-linkrow input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
.nt-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.nt-toolbar button {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; height: 36px; padding: 0 12px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.nt-gate { text-align: center; padding: 32px 16px; }
.nt-gate input { height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; font: inherit; width: min(320px, 100%); }
.nt-gate .pradd { margin-top: 12px; }
.nt-hacts { display: none; }
.nt-row { position: relative; }
@media (hover:hover) {
  .nt-row:hover .nt-hacts { display: flex; gap: 6px; position: absolute; right: 8px; top: 8px; }
  .nt-hacts button { height: 26px; padding: 0 8px; font-size: 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 600; }
}
.nt-pin-move { display: inline-flex; gap: 2px; margin: 4px 0 0; }
.nt-pin-btn { width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.nt-pin-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.nt-pin-btn:disabled { opacity: .35; }
.nt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nt-tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
