/* The note page, simpler (notes-page.js, 17 Nov 2026). Everything is scoped to the note
   view once notes-page.js has drawn it (#view-note.nn), or to its own nn- names. */

/* the old page's side boxes and its Back/Saved strip are not drawn on a laptop */
#view-note.nn #noteRail{display:none}
@media (min-width:761px){#view-note.nn #ntBar{display:none}}

/* flat on the work area, no sheet: the note keeps the work area's own ground, not the desk tone
   note-editor.css gives the old sheet (body.note-mode main) */
body.note-mode main:has(#view-note.nn){background:var(--paper)}
#view-note.nn .nt-page{display:block;max-width:860px;margin:0 auto;padding:0}
#view-note.nn .nt-page .nt-sheet{background:none;border:0;box-shadow:none;border-radius:0;margin:0;max-width:none;min-height:0;padding:28px 40px 80px}

/* ── head: the line over the title, the title, Link ── */
.nn-head{display:flex;align-items:flex-start;gap:16px}
.nn-head-l{flex:1;min-width:0}
.nn-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-height:20px;font-family:'Inter',sans-serif;font-size:13px;color:var(--ink-soft)}
.nn-meta .nn-dot{color:var(--ink-faint)}
.nn-meta .nn-date{color:var(--ink-soft)}
.nn-meta .nn-date:hover{color:var(--ink)}
.nn-title{display:block;width:100%;border:0;background:none;outline:none;margin:0;padding:4px 0 2px;
  font:600 28px/1.25 'Inter',sans-serif;letter-spacing:-.02em;color:var(--ink);text-overflow:ellipsis}
.nn-title::placeholder{color:var(--ink-faint)}
/* a note she may read but not write (fix round, 17 Nov 2026): the same page, nothing that changes it */
.nn-title-ro{overflow:hidden;white-space:nowrap}
.nn-title-ro .nn-ph{color:var(--ink-faint)}
.nn-rotag{flex:none;margin-top:26px;padding:4px 10px;border-radius:999px;background:color-mix(in srgb,var(--ink) 7%,transparent);
  font:500 13px/1.3 'Inter',sans-serif;color:var(--ink-soft)}
#view-note.nn-ro .nt-body{cursor:default}
#view-note.nn-ro .nt-body .todo .bx,#view-note.nn-ro .nt-body .todo .meta{pointer-events:none}
#view-note.nn-ro .nt-imgx{display:none}
#view-note.nn-ro #noteSaveWrap{visibility:hidden}   /* nothing is saved here, so no "Saved" either */
.nn-lerr{color:var(--accent)}
.nn-linkbtn{flex:none;margin-top:22px;display:inline-flex;align-items:center;gap:7px}
.nn-ic{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.nn-linkbtn .nn-ic{width:17px;height:17px}

/* ── who was there ── */
.nn-who{display:flex;flex-wrap:wrap;gap:12px 36px;margin-top:16px}
.nn-party{display:flex;align-items:center;gap:10px;min-width:0}
.nn-pl{flex:none;width:74px;font-family:'Inter',sans-serif;font-size:13px;font-weight:600;color:var(--ink-soft)}
#view-note.nn .nt-people{gap:8px}
#view-note.nn .nt-person{height:32px;gap:7px;padding:0 4px 0 4px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--rule)}
#view-note.nn .nt-person:hover{background:var(--surface);box-shadow:inset 0 0 0 1px var(--ink-faint)}
#view-note.nn .nt-person>span.nm{font-size:14px;color:var(--ink)}
#view-note.nn .nt-av{width:24px;height:24px;font-size:11px;color:#fff}
#view-note.nn .nt-person .x{width:22px;height:22px;padding:0;border-radius:50%;display:grid;place-items:center;color:var(--ink-faint)}
#view-note.nn .nt-person .x:hover{background:color-mix(in srgb,var(--ink) 7%,transparent);color:var(--accent)}
#view-note.nn .nt-person .x .nn-ic{width:13px;height:13px}
#view-note.nn .nt-add{width:110px;height:32px;padding:0 12px;font-size:14px;border:1px dashed var(--rule-strong)}
#view-note.nn .nt-add::placeholder{color:var(--ink-soft)}
#view-note.nn .nt-add:focus{width:180px;border-style:solid;border-color:var(--ink-faint)}

/* ── what it is linked to ── */
.nn-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px}
.nn-links:empty{display:none}
.nn-lk{--edge:var(--ink-faint);display:inline-flex;align-items:center;max-width:100%;height:34px;padding:0 5px 0 0;border-radius:8px;
  background:var(--surface);box-shadow:inset 3px 0 0 var(--edge),inset 0 0 0 1px var(--rule);font-family:'Inter',sans-serif}
.nn-lk:hover{box-shadow:inset 3px 0 0 var(--edge),inset 0 0 0 1px var(--ink-faint)}
.nn-lk-project{--edge:#2e8b57}
.nn-lk-go{display:inline-flex;align-items:center;gap:8px;min-width:0;height:100%;padding:0 6px 0 13px;border:0;background:none;cursor:pointer;color:var(--ink);font:inherit;font-size:14px}
.nn-lk-go em{font-style:normal;font-size:13px;color:var(--ink-soft)}
.nn-lk-go b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}
.nn-lk-x{flex:none;width:24px;height:24px;border:0;border-radius:6px;background:none;cursor:pointer;color:var(--ink-faint);display:grid;place-items:center;padding:0}
.nn-lk-x:hover{background:color-mix(in srgb,var(--ink) 7%,transparent);color:var(--accent)}
.nn-lk-x .nn-ic{width:14px;height:14px}

/* ── the writing bar: five tools, saved at its right end ── */
.nn-tb{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:2px;margin-top:20px;padding:5px 0;
  background:var(--paper);border-bottom:1px solid var(--rule)}
.nn-tb button,.nn-tb label{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;min-width:32px;padding:0 8px;
  border:0;border-radius:7px;background:none;cursor:pointer;color:var(--ink-soft);font-family:'Inter',sans-serif;font-size:14px;font-weight:500;
  flex:none;white-space:nowrap}   /* a narrow note side (grip dragged) never wraps "Tick box" onto two lines */
.nn-tb button:hover,.nn-tb label:hover{background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink)}
.nn-tb button.on{background:var(--ink);color:var(--on-ink)}
.nn-tb .nn-h{font-weight:700}
.nn-tb .sep{width:1px;height:18px;background:var(--rule);margin:0 4px}
.nn-tb input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.nn-tb-sp{flex:1}
.nn-saveslot{display:inline-flex;align-items:center;min-width:96px;justify-content:flex-end;padding-right:4px}

/* ── the writing ── */
#view-note.nn .nt-page .nn-body{padding:18px 0 24px;min-height:40vh;font-size:15px;line-height:1.75;white-space:normal;max-width:72ch}
#view-note.nn .nn-body.nt-empty:before{content:attr(data-ph);color:var(--ink-faint)}
/* the one heading size of the approved try, on a phone too (app.css forces phone h2 sizes with !important) */
#view-note.nn .nn-body h2{font-family:'Inter',sans-serif;font-size:19px!important;font-weight:600;line-height:1.35!important;letter-spacing:-.01em;margin:18px 0 4px}

/* ── old recordings: play only ── */
.nn-rec{margin-top:28px;padding-top:14px;border-top:1px solid var(--rule)}
.nn-rec[hidden]{display:none}
.nn-rec-h{font-family:'Inter',sans-serif;font-size:13px;font-weight:600;color:var(--ink-soft);margin-bottom:6px}
.nn-rec-row{display:flex;align-items:center;gap:12px;height:44px;font-family:'Inter',sans-serif;font-size:14px;color:var(--ink)}
.nn-play{flex:none;width:34px;height:34px;border-radius:50%;border:0;cursor:pointer;display:grid;place-items:center;padding:0;
  background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1px var(--rule-strong);transition:background .15s,color .15s}
.nn-play:hover{box-shadow:inset 0 0 0 1px var(--ink-faint)}
.nn-play.on{background:var(--ink);color:var(--on-ink);box-shadow:none}
.nn-play .nn-ic{width:16px;height:16px;stroke-width:2}
.nn-rec-len{color:var(--ink-soft);font-size:13px;font-variant-numeric:tabular-nums}

/* ── the Link pop-up ── */
.nn-lpop{width:100%;max-width:560px;display:flex;flex-direction:column;overflow:hidden}
.nn-ltabs{position:relative;display:flex;gap:22px;padding:0 24px;border-bottom:1px solid var(--rule)}
.nn-ltabs button{border:0;background:none;padding:10px 0 9px;cursor:pointer;font-family:'Inter',sans-serif;font-size:15px;font-weight:500;color:var(--ink-soft)}
.nn-ltabs button.on{color:var(--ink);font-weight:600}
.nn-ltabs-bar{position:absolute;left:0;bottom:-1px;height:2px;width:0;background:var(--ink);
  transition:transform .22s cubic-bezier(.2,.8,.2,1),width .22s cubic-bezier(.2,.8,.2,1)}
.nn-lbd{padding-top:12px}
.nn-lfind{display:flex;align-items:center;gap:8px;height:42px;padding:0 12px;border-radius:10px;background:var(--field);margin-bottom:8px;color:var(--ink-soft)}
.nn-lfind input{flex:1;min-width:0;border:0;background:none;outline:none;font:inherit;font-family:'Inter',sans-serif;font-size:15px;color:var(--ink)}
.nn-lfind input::placeholder{color:var(--ink-soft)}
.nn-lrows{height:min(340px,48vh);overflow:auto;overscroll-behavior:contain;margin:0 -10px}
.nn-lrow{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;width:100%;text-align:left;border:0;background:none;
  padding:9px 12px;border-radius:9px;cursor:pointer;font-family:'Inter',sans-serif;color:var(--ink)}
.nn-lrow:hover{background:color-mix(in srgb,var(--ink) 6%,transparent)}
.nn-lrow-t{min-width:0}
.nn-lrow b{display:block;font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nn-lrow-t span{display:block;font-size:13px;color:var(--ink-soft)}
.nn-lrow em{font-style:normal;font-size:13px;font-weight:600;color:var(--ink)}
.nn-lrow.keep b{font-weight:500}
.nn-lnone{padding:14px 12px;font-family:'Inter',sans-serif;font-size:14px;color:var(--ink-soft)}

/* ── a visit's note (notes-visit.js, Phase C): the visit over the title, what came of it under it ── */
.nn-from{display:inline-flex;align-items:center;gap:7px;height:22px;padding:0;border:0;background:none;cursor:pointer;
  font:inherit;font-family:'Inter',sans-serif;font-size:13px;font-weight:600;color:var(--ink)}
.nn-from i{width:8px;height:8px;border-radius:50%;background:#2f6fdb;flex:none}
.nn-from:hover .nn-from-t{text-decoration:underline;text-underline-offset:3px}
/* one line: a long customer name gives way with "…", the day keeps its place */
.nn-meta:has(.nn-from){flex-wrap:nowrap;min-width:0}
.nn-from{min-width:0;max-width:100%}
.nn-from-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nn-meta:has(.nn-from) .nn-dot,.nn-meta:has(.nn-from) .nn-date{flex:none;white-space:nowrap}
/* one line; a long one fades out with "…", and hovering shows it whole in a box over the page (nothing below moves) */
.nn-vres{position:relative;margin:2px 0 0;font-family:'Inter',sans-serif;font-size:14px;line-height:1.5;color:var(--ink-soft)}
.nn-vres>.t{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nn-vres.long>.t{-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent)}
.nn-vres>.full{display:none;position:absolute;z-index:30;left:-10px;right:-10px;top:-6px;padding:6px 10px;border-radius:8px;
  background:var(--surface);color:var(--ink);box-shadow:0 0 0 1px var(--rule),0 8px 24px rgba(0,0,0,.12);white-space:normal}
.nn-vres.long:hover>.full{display:block}
/* the question before a note is added to a visit's note */
.nn-mpop{width:100%;max-width:440px}
.nn-mpop .dlg-bd p{margin:0;font-family:'Inter',sans-serif;font-size:15px;line-height:1.5;color:var(--ink-soft)}
.nn-mpop .dlg-bd b{color:var(--ink);font-weight:600}

/* ── the side column on a laptop: one node (#nnSide) on the list and on a note ── */
#appside .as-end #nnSide{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:1px!important}
#appside .as-end #nnSide > .mast-side{margin-top:6px!important}

/* ── phone ── */
@media (max-width:760px){
  #view-note.nn .nt-page{padding:0}
  #view-note.nn .nt-page .nt-sheet{padding:14px 16px 60px}
  .nn-title{font-size:24px!important}
  .nn-linkbtn{margin-top:18px}
  .nn-who{gap:12px}
  .nn-party{flex-wrap:wrap;gap:8px}
  .nn-pl{width:100%}
  .nn-tb{margin:16px -16px 0;padding:5px 12px;overflow-x:auto;scrollbar-width:none}
  .nn-tb::-webkit-scrollbar{display:none}
  .nn-tb button,.nn-tb label{min-width:40px;height:40px}
  .nn-saveslot{min-width:0}
  #view-note.nn .nt-page .nn-body{font-size:15px!important}
  .nn-lk-go b{max-width:180px}
}
