/* =====================================================================
   DOVYR HEALTH · Anotações (0.23)
   Três colunas: cadernos · lista · anotação. Papel de leitura no centro,
   preto-grafite, ácido só no cursor, nos checks marcados e nos links.
   ===================================================================== */
.page.nt-page { max-width: none; height: 100vh; display: flex; flex-direction: column; padding: 36px 32px 20px; }
.nt-head { margin-bottom: 22px; }
.nt-head .lead { max-width: 70ch; }
.nt { flex: 1; min-height: 0; display: grid; grid-template-columns: 212px 300px minmax(0, 1fr); border: 1px solid var(--panel-line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.nt.focus { grid-template-columns: 0 0 minmax(0, 1fr); }
.nt.focus .nt-nav, .nt.focus .nt-list { visibility: hidden; border: 0; padding: 0; }

/* ---------- cadernos ---------- */
.nt-nav { border-right: 1px solid var(--panel-line); padding: 14px 10px; overflow: auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nt-v { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font-size: 13.5px; text-align: left; transition: background .15s, color .15s; }
.nt-v svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.nt-v span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-v b { font-weight: 500; font-size: 12px; color: var(--ink-4); }
.nt-v:hover { background: var(--hover); color: var(--ink); }
.nt-v[aria-current] { background: var(--press); color: var(--ink); font-weight: 550; }
.nt-v[aria-current] svg { color: var(--acid-text); }
.nt-cap { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 4px; padding: 0 10px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.nt-cap button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--ink-3); }
.nt-cap button:hover { background: var(--hover); color: var(--ink); }
.nt-cap svg { width: 14px; height: 14px; }
.nt-bk { position: relative; }
.nt-bk .nt-v { padding-right: 34px; }
.nt-more { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--ink-3); opacity: 0; transition: opacity .15s; }
.nt-bk:hover .nt-more, .nt-more:focus-visible { opacity: 1; }
.nt-bk:hover .nt-v b { opacity: 0; }
.nt-more:hover { background: var(--hover); color: var(--ink); }
.nt-more svg { width: 16px; height: 16px; }
.nt-navfoot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--panel-line); }
.nt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--acid-fill); }
.nt-dot.c-white { background: var(--tone-a); }
.nt-dot.c-graphite { background: var(--tone-b); }
.seg .nt-dot { margin-right: 7px; }

/* ---------- lista ---------- */
.nt-list { border-right: 1px solid var(--panel-line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.nt-lh { padding: 16px 16px 12px; border-bottom: 1px solid var(--panel-line); display: flex; flex-direction: column; gap: 10px; }
.nt-lt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.nt-lt h2 { margin: 0; font: 600 16px/1.3 var(--display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-vsel { display: none; height: 36px; font-size: 13px; }
.nt-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); transition: border-color .2s; }
.nt-search:focus-within { border-color: var(--acid-line); }
.nt-search svg { width: 15px; height: 15px; color: var(--ink-4); flex: none; }
.nt-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; }
.nt-empty-trash { align-self: flex-start; color: var(--loss); padding: 0 8px; height: 28px; }
.nt-items { flex: 1; overflow: auto; padding: 8px; }
.nt-it { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 11px 12px; border-radius: 11px; text-align: left; transition: background .15s; position: relative; }
.nt-it + .nt-it::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--panel-line); }
.nt-it:hover { background: var(--hover); }
.nt-it[aria-current] { background: var(--press); }
.nt-it[aria-current]::before, .nt-it[aria-current] + .nt-it::before, .nt-it:hover::before, .nt-it:hover + .nt-it::before { opacity: 0; }
.nt-it[aria-current]::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--acid-fill); }
.nt-it-t { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); min-width: 0; }
.nt-it-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-pin { display: inline-grid; color: var(--acid-text); flex: none; }
.nt-pin svg { width: 13px; height: 13px; }
.nt-it-s { font-size: 12.5px; line-height: 1.45; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-it-s em { font-style: normal; color: var(--ink-4); }
.nt-it-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 11.5px; color: var(--ink-4); }
.nt-it-b { display: inline-flex; align-items: center; gap: 5px; }
.nt-it-b .nt-dot { width: 7px; height: 7px; }
.nt-tag { color: var(--ink-3); }
.nt-none { padding: 28px 14px; font-size: 13px; color: var(--ink-3); line-height: 1.55; }

/* ---------- documento ---------- */
.nt-doc { min-width: 0; min-height: 0; overflow: auto; position: relative; background: var(--bg); scroll-padding-top: 110px; }
.nt-dh { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px 8px; }
.nt-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-4); min-width: 0; flex-wrap: wrap; }
.nt-sepdot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
.nt-bkpick { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px 0 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.nt-bkpick:hover { border-color: var(--line-strong); }
.nt-bkpick select { border: 0; outline: 0; background: none; font-size: 12.5px; padding-right: 2px; cursor: pointer; max-width: 160px; }
.nt-bkpick select option { background: var(--raised); color: var(--ink); }
.nt-acts { display: flex; gap: 4px; }
.nt-ib { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--ink-3); transition: background .15s, color .15s; }
.nt-ib:hover { background: var(--hover); color: var(--ink); }
.nt-ib[aria-pressed="true"] { color: var(--acid-text); }
.nt-ib svg { width: 17px; height: 17px; }
.nt-barhost { position: sticky; top: 0; z-index: 6; }
.nt-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 820px; margin: 10px auto 0; padding: 10px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--panel-line); font-size: 13px; color: var(--ink-2); }
.nt-banner span { flex: 1; min-width: 200px; }
.nt-banner svg { width: 15px; height: 15px; }
.nt-paper { max-width: 820px; margin: 0 auto; padding: 30px 56px 120px; }
.nt.focus .nt-paper { max-width: 860px; }
.nt-title { display: block; width: 100%; resize: none; overflow: hidden; border: 0; outline: 0; background: none; padding: 0; margin: 0 0 10px; font: 650 36px/1.15 var(--display); letter-spacing: -.03em; color: var(--ink); }
.nt-title::placeholder { color: var(--ink-4); opacity: .55; }
.nt-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; min-height: 26px; }
.nt-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 9px; border-radius: 7px; background: var(--hover); color: var(--ink-2); font-size: 12px; }
.nt-chip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: var(--ink-4); }
.nt-chip button:hover { color: var(--ink); background: var(--press); }
.nt-chip svg { width: 11px; height: 11px; }
.nt-taginp { border: 0; outline: 0; background: none; font-size: 12.5px; width: 90px; color: var(--ink-3); padding: 0 4px; height: 24px; }
.nt-taginp::placeholder { color: var(--ink-4); }

.nt-blank { max-width: 460px; margin: 12vh auto 0; padding: 0 24px; text-align: center; color: var(--ink-3); }
.nt-blank-ic { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--acid-wash); color: var(--acid-text); margin-bottom: 16px; }
.nt-blank-ic svg { width: 26px; height: 26px; }
.nt-blank h3 { margin: 0 0 8px; font: 600 20px/1.3 var(--display); color: var(--ink); }
.nt-blank p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; }
.nt-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 26px; font-size: 12px; color: var(--ink-4); }
.nt-keys kbd, .ned kbd { display: inline-block; min-width: 20px; padding: 1px 6px; margin-right: 5px; border-radius: 5px; border: 1px solid var(--line); font: 500 11px/1.5 var(--font); color: var(--ink-2); text-align: center; }

/* ---------- menus ---------- */
.nt-menu { position: fixed; z-index: 80; min-width: 230px; padding: 6px; border-radius: 13px; background: var(--pop); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s var(--ease); }
.nt-menu.on { opacity: 1; transform: none; }
.nt-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--ink-2); text-align: left; }
.nt-menu button:hover { background: var(--hover); color: var(--ink); }
.nt-menu button svg { width: 16px; height: 16px; color: var(--ink-3); }
.nt-menu button.bad, .nt-menu button.bad svg { color: var(--loss); }
.nt-menu hr { border: 0; height: 1px; background: var(--rule); margin: 5px 4px; }

/* =====================================================================
   editor
   ===================================================================== */
.ned { position: relative; }
.ned-bar { display: flex; align-items: center; gap: 2px; padding: 6px 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--panel-line); flex-wrap: wrap; }
.ned-bar.off { display: none; }
.ned-b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--ink-3); transition: background .12s, color .12s; }
.ned-b:hover { background: var(--hover); color: var(--ink); }
.ned-b[aria-pressed="true"] { color: var(--acid-text); background: var(--acid-wash); }
.ned-b svg { width: 17px; height: 17px; }
.ned-sep { width: 1px; height: 18px; background: var(--rule); margin: 0 6px; }
.ned-tbl { display: contents; }
.ned-tbl[hidden] { display: none; }
.ned-grow { flex: 1; }
.ned-sel { position: relative; }
.ned-type { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 10px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--ink-2); min-width: 112px; justify-content: space-between; }
.ned-type:hover { background: var(--hover); color: var(--ink); }
.ned-type svg { width: 14px; height: 14px; color: var(--ink-4); }
.ned-pop { position: absolute; z-index: 40; background: var(--pop); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); padding: 6px; }
.ned-types { top: calc(100% + 6px); left: 0; width: 220px; display: none; }
.ned-types.on { display: block; }
.ned-types button, .ned-slash button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--ink-2); text-align: left; }
.ned-types button:hover, .ned-slash button:hover, .ned-slash button[aria-selected="true"] { background: var(--hover); color: var(--ink); }
.ned-slash button[aria-selected="true"] { background: var(--press); }
.ned-types i, .ned-slash i { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; border: 1px solid var(--line); font: 650 11.5px/1 var(--font); font-style: normal; color: var(--ink-2); background: var(--raised); }
.ned-types i { width: 24px; height: 24px; border-radius: 6px; font-size: 10.5px; }
.ned-types i svg, .ned-slash i svg { width: 16px; height: 16px; }
.ned-types i svg { width: 14px; height: 14px; }
.ned-slash { width: 270px; max-height: 330px; overflow: auto; }
.ned-slash b { display: block; font-weight: 550; font-size: 13px; color: var(--ink); }
.ned-slash small { display: block; font-size: 11.5px; color: var(--ink-4); }
.ned-ph { margin: 4px 8px 6px; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.ned-bubble { display: flex; gap: 1px; padding: 4px; border-radius: 11px; }
.ned-bubble[hidden] { display: none; }
.ned-bubble button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--ink-2); }
.ned-bubble button:hover { background: var(--hover); color: var(--ink); }
.ned-bubble button[aria-pressed="true"] { color: var(--acid-text); }
.ned-bubble svg { width: 16px; height: 16px; }
.ned-link { display: flex; gap: 6px; align-items: center; width: 340px; padding: 6px; }
.ned-link[hidden] { display: none; }
.ned-link .inp { height: 36px; font-size: 13px; }
.ned-wrap { position: relative; }
.ned-hint { position: absolute; pointer-events: none; color: var(--ink-4); font-size: 15.5px; line-height: 1.7; opacity: .7; white-space: nowrap; }
.ned-grip { position: absolute; left: -34px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--ink-4); cursor: grab; opacity: .75; touch-action: none; }
.ned-grip:hover { background: var(--hover); color: var(--ink-2); opacity: 1; }
.ned-grip svg { width: 16px; height: 16px; }
.ned-drop { position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--acid-fill); pointer-events: none; }
.ned-dragging { opacity: .35; }
body.ned-grabbing, body.ned-grabbing * { cursor: grabbing !important; user-select: none; }

/* conteúdo */
.ned-c { position: relative; outline: none; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); caret-color: var(--acid-text); min-height: 50vh; word-wrap: break-word; overflow-wrap: break-word; }
.ned-c[data-empty]::before { content: attr(data-ph); position: absolute; left: 0; top: 0; color: var(--ink-4); opacity: .75; pointer-events: none; }
.ned-c > :first-child { margin-top: 0; }
.ned-c p { margin: 0 0 .55em; }
.ned-c h1, .ned-c h2, .ned-c h3 { color: var(--ink); font-family: var(--display); letter-spacing: -.02em; }
.ned-c h1 { font-size: 28px; line-height: 1.22; font-weight: 650; margin: 1.35em 0 .45em; }
.ned-c h2 { font-size: 22px; line-height: 1.28; font-weight: 620; margin: 1.3em 0 .4em; }
.ned-c h3 { font-size: 17.5px; line-height: 1.35; font-weight: 620; margin: 1.15em 0 .35em; }
.ned-c strong, .ned-c b { color: var(--ink); font-weight: 650; }
.ned-c a { color: var(--acid-text); text-decoration: underline; text-decoration-color: var(--acid-line); text-underline-offset: 3px; }
.ned-c mark { background: rgba(216, 255, 62, .2); color: var(--ink); border-radius: 3px; padding: 0 2px; }
html[data-theme="light"] .ned-c mark { background: rgba(170, 210, 0, .35); }
.ned-c code { font: 500 .86em/1.4 ui-monospace, "SF Mono", Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--hover); border: 1px solid var(--rule); color: var(--ink); }
.ned-c pre { margin: .9em 0; padding: 14px 18px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--panel-line); font: 400 13.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); white-space: pre-wrap; tab-size: 2; }
.ned-c hr { border: 0; height: 1px; background: var(--line); margin: 1.8em 0; }
.ned-c blockquote { margin: .9em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--tone-a); color: var(--ink-2); }
.ned-c blockquote p:last-child, .ned-c .callout p:last-child { margin-bottom: 0; }
.ned-c .callout { position: relative; margin: 1em 0; padding: 14px 18px 14px 50px; border-radius: 13px; background: var(--acid-wash); border: 1px solid var(--acid-line); color: var(--ink); }
.ned-c .callout::before { content: ""; position: absolute; left: 17px; top: 16px; width: 20px; height: 20px; background: var(--acid-text);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1.1 1.3 1.1 2.2h5c0-.9.5-1.7 1.1-2.2A6 6 0 0 0 12 3z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1.1 1.3 1.1 2.2h5c0-.9.5-1.7 1.1-2.2A6 6 0 0 0 12 3z'/></svg>") center / contain no-repeat; }
.ned-c ul, .ned-c ol { margin: .35em 0 .7em; padding-left: 26px; }
.ned-c li { margin: .18em 0; padding-left: 2px; }
.ned-c li > ul, .ned-c li > ol { margin: .15em 0 .25em; }
.ned-c ul > li::marker { color: var(--ink-4); }
.ned-c ol > li::marker { color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 550; }
.ned-c ul.todo { list-style: none; padding-left: 2px; }
.ned-c ul.todo > li { position: relative; padding-left: 30px; }
.ned-c ul.todo > li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--line-strong); background: var(--field); cursor: pointer; transition: background .15s, border-color .15s; }
.ned-c ul.todo > li:hover::before { border-color: var(--acid-line); }
.ned-c ul.todo > li[data-done="true"]::before { background: var(--acid-fill); border-color: var(--acid-fill);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111316' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.5l4 4 8-9'/></svg>"); background-size: 13px; background-position: center; background-repeat: no-repeat; }
.ned-c ul.todo > li[data-done="true"] { color: var(--ink-4); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.ned-c ul.todo > li[data-done="true"] li { text-decoration: none; }
.ned-c table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1em 0 1.1em; font-size: 14px; line-height: 1.5; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.ned-c th, .ned-c td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); min-width: 60px; }
.ned-c tr > :last-child { border-right: 0; }
.ned-c tbody tr:last-child > * { border-bottom: 0; }
.ned-c th { background: var(--panel-2); color: var(--ink); font-weight: 600; font-size: 13px; }
.ned-c td:focus-within, .ned-c th:focus-within { box-shadow: inset 0 0 0 1.5px var(--acid-line); }

/* telas menores: os cadernos viram uma lista suspensa */
@media (max-width: 1400px) {
  .nt { grid-template-columns: 286px minmax(0, 1fr); }
  .nt-nav { display: none; }
  .nt-vsel { display: block; }
  .nt.focus { grid-template-columns: 0 minmax(0, 1fr); }
  .nt-paper { padding: 26px 44px 120px; }
}
@media (max-width: 1260px) {
  .page.nt-page { padding: 32px 24px 18px; }
  .nt { grid-template-columns: 262px minmax(0, 1fr); }
  .nt-paper { padding: 24px 36px 120px; }
  .nt-title { font-size: 31px; }
  .nt-head .lead { display: none; }
}

/* imprimir / salvar em PDF: só a anotação */
#nt-print { display: none; }
@media print {
  body.nt-printing { overflow: visible !important; background: #fff !important; }
  body.nt-printing > *:not(#nt-print) { display: none !important; }
  body.nt-printing #nt-print { display: block; color: #111; font: 400 12pt/1.6 var(--font); }
  #nt-print .nt-print-t { font: 650 24pt/1.2 var(--display); margin: 0 0 14pt; color: #000; }
  #nt-print .ned-c { min-height: 0; color: #222; caret-color: auto; font-size: 11.5pt; }
  #nt-print .ned-c h1, #nt-print .ned-c h2, #nt-print .ned-c h3, #nt-print .ned-c strong { color: #000; }
  #nt-print .ned-c a { color: #000; }
  #nt-print .ned-c pre, #nt-print .ned-c th, #nt-print .ned-c .callout { background: #f3f4f5; border-color: #ddd; color: #111; }
  #nt-print .ned-c .callout::before { background: #555; }
  #nt-print .ned-c table, #nt-print .ned-c th, #nt-print .ned-c td { border-color: #ccc; }
  #nt-print .ned-c ul.todo > li::before { border-color: #777; background: #fff; }
  #nt-print .ned-c ul.todo > li[data-done="true"]::before { background-color: #111; }
  #nt-print .ned-c mark { background: #eef7c6; }
  #nt-print .ned-c blockquote { border-left-color: #999; }
}
