/* Notes and the journal, redesigned (2 Dec 2026). The writing page (#jw) sits over the app like a sheet of paper; Notes home
   is Diary · Projects · Search. Uses the app's tokens, so the board look and dark mode both apply. */

/* ---------- the writing page ---------- */
.jw { position: fixed; inset: 0; z-index: 900; background: var(--paper, #fff); color: var(--ink, #111); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
.jw[hidden] { display: none; }
html.jw-open, html.jw-open body { overflow: hidden; }
.jw-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px 6px 16px; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.jw-date { border: 0; background: none; padding: 10px 0; min-height: 44px; font: 500 12px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2, #6b6b6b); cursor: pointer; }
.jw-saved { flex: 1; font: 500 11px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2, #6b6b6b); text-align: right; }
.jw-done { border: 0; border-radius: 12px; background: var(--ink, #111); color: var(--paper, #fff); font: 650 15px var(--sans, sans-serif); min-height: 44px; padding: 0 18px; cursor: pointer; }
.jw-ctx { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 4px; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.jw-tag { border: 1px solid var(--rule-2, rgba(0,0,0,.2)); background: var(--paper, #fff); border-radius: 8px; min-height: 32px; padding: 0 10px; font: 500 13px var(--sans, sans-serif); color: var(--ink, #111); cursor: pointer; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jw-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 16px 40px; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.jw-q { margin: 0 0 2px; }
.jw-q button { border: 0; background: none; padding: 6px 0; min-height: 36px; font: 500 12px var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2, #6b6b6b); cursor: pointer; }
.jw-ed { position: relative; min-height: 60vh; outline: none; font: 400 18px/1.55 var(--sans, sans-serif); color: var(--ink, #111); word-wrap: break-word; caret-color: var(--sage, #1F9D55); }
.jw-ed.empty::before { content: attr(data-ph); color: var(--ink-2, #6b6b6b); opacity: .7; pointer-events: none; position: absolute; font-size: 22px; font-family: var(--serif, serif); font-weight: 700; letter-spacing: -.02em; }
.jw-ed > :first-child { margin-top: 0; }
/* the first line reads as the title */
.jw-ed > p:first-child, .jw-ed > div:first-child:not(.ck):not([data-link]) { font: 750 24px/1.25 var(--serif, serif); letter-spacing: -.025em; }
.jw-ed h2 { font: 800 26px/1.2 var(--serif, serif); letter-spacing: -.03em; margin: 18px 0 6px; }
.jw-ed h3 { font: 700 19px/1.3 var(--serif, serif); letter-spacing: -.02em; margin: 14px 0 4px; }
.jw-ed p { margin: 0 0 10px; }
.jw-ed ul, .jw-ed ol { margin: 0 0 10px; padding-left: 24px; }
.jw-ed figure { margin: 12px 0; position: relative; }
.jw-ed figure img { display: block; width: 100%; max-height: 70vh; object-fit: cover; border-radius: 12px; }
.jw-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(17,17,17,.72); color: #fff; font: 500 20px/1 var(--sans, sans-serif); cursor: pointer; }
.jw-m { display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 6px; background: var(--sage-wash, #E9F6EE); color: var(--ink, #111); font-weight: 600; font-size: .92em; line-height: 1.5; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.jw-m::before { content: "@"; opacity: .45; margin-right: 1px; }
.jw-ed .ck, .jdoc .ck { display: block; width: auto; height: auto; border: 0; border-radius: 0; background: none; position: relative; padding-left: 34px; margin: 0 0 6px; min-height: 28px; }
.jbox { position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border: 1.5px solid var(--ink, #111); border-radius: 50%; cursor: pointer; display: block; box-sizing: border-box; }
.jw-ed .ck[data-d="1"] .jbox, .jdoc .ck[data-d="1"] .jbox { background: var(--sage, #1F9D55); border-color: var(--sage, #1F9D55); }
.jw-ed .ck[data-d="1"] .jbox::after, .jdoc .ck[data-d="1"] .jbox::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.jw-ed .ck[data-d="1"], .jdoc .ck[data-d="1"] { color: var(--ink-2, #6b6b6b); text-decoration: line-through; }
.jw-card { position: relative; margin: 10px 0; }
.jw-card a { display: flex; align-items: center; gap: 12px; border: 1px solid var(--rule-2, rgba(0,0,0,.2)); border-radius: 12px; padding: 8px; text-decoration: none; color: var(--ink, #111); background: var(--card, #f4f4f2); }
.jw-card img, .jw-ci { flex: none; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--paper-2, #ededea); display: grid; place-items: center; font-size: 22px; }
.jw-card a > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 30px; }
.jw-card b { font: 650 15px/1.3 var(--sans, sans-serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jw-card small { font: 500 11px var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2, #6b6b6b); }
.jw-card .jw-x { top: 50%; transform: translateY(-50%); width: 30px; height: 30px; font-size: 17px; }
/* the tool bar sits above the keyboard */
.jw-bar { display: flex; justify-content: space-between; gap: 2px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule, rgba(0,0,0,.1)); background: var(--paper, #fff); max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; overflow-x: auto; scrollbar-width: none; }
.jw-bar button { flex: 1 0 44px; min-width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; color: var(--ink, #111); display: grid; place-items: center; font: 600 16px var(--sans, sans-serif); cursor: pointer; }
.jw-bar button.jw-fw { flex: 1 0 auto; min-width: 0; padding: 0 6px; font: 650 14px var(--sans, sans-serif); }
.jw-bar.fmt button:not(.jw-fw) { flex: 1 0 36px; min-width: 36px; }
.jw-bar button.jw-on, .jw-bar button:active { background: var(--paper-2, #ededea); }
.jw-bar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* @ list */
.jw-pop { position: absolute; left: 12px; right: 12px; bottom: calc(64px + env(safe-area-inset-bottom)); max-width: 460px; margin: 0 auto; background: var(--paper, #fff); border: 1px solid var(--rule-2, rgba(0,0,0,.2)); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 6px; z-index: 2; max-height: 46vh; overflow-y: auto; }
.jw-pop[hidden] { display: none; }
.jw-ph { margin: 4px 8px 4px; font: 500 11px var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2, #6b6b6b); }
.jw-pop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; min-height: 48px; padding: 6px 8px; cursor: pointer; color: var(--ink, #111); }
.jw-pop button.on, .jw-pop button:hover { background: var(--card, #f4f4f2); }
.jw-pop button > span:last-child { display: flex; flex-direction: column; min-width: 0; font: 600 15px var(--sans, sans-serif); }
.jw-pop small { font: 500 11px var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2, #6b6b6b); }
.jw-k { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--ink, #111); color: var(--paper, #fff); display: grid; place-items: center; font: 600 13px var(--mono, monospace); }
/* the … sheet */
.jw-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.32); display: flex; align-items: flex-end; justify-content: center; z-index: 3; }
.jw-sheet { width: 100%; max-width: 520px; max-height: 80vh; overflow-y: auto; background: var(--paper, #fff); border-radius: 18px 18px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.jw-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--rule-2, rgba(0,0,0,.2)); margin: 4px auto 10px; }
.jw-sheet h2 { font: 800 20px var(--serif, serif); letter-spacing: -.02em; margin: 4px 0 8px; }
.jw-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--rule, rgba(0,0,0,.1)); background: none; min-height: 52px; padding: 8px 2px; font: 550 16px var(--sans, sans-serif); color: var(--ink, #111); cursor: pointer; }
.jw-opt b { font: 500 11px var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; color: var(--ink-2, #6b6b6b); }
.jw-opt small { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px var(--sans, sans-serif); color: var(--ink-2, #6b6b6b); }
.jw-opt.danger { color: #B3261E; border-bottom: 0; }
.jw-new { display: flex; gap: 8px; margin: 12px 0 4px; }
.jw-new input { flex: 1; min-width: 0; min-height: 46px; border: 1.5px solid var(--ink, #111); border-radius: 12px; padding: 0 12px; font: 500 16px var(--sans, sans-serif); background: var(--paper, #fff); color: var(--ink, #111); }
.jw-fine { font: 400 13px var(--sans, sans-serif); color: var(--ink-2, #6b6b6b); margin: 6px 0 0; }

/* ---------- Notes home ---------- */
.jseg { display: flex; border: 1.5px solid var(--ink); border-radius: 12px; padding: 3px; margin: 14px 0 12px; }
.jseg button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: none; font: 600 15px var(--sans); color: var(--ink); cursor: pointer; }
.jseg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.jago { display: flex; gap: 12px; align-items: stretch; border-radius: 14px; background: var(--board, #16181a); color: #fff; overflow: hidden; margin: 0 0 14px; }
.jago img { width: 96px; flex: none; object-fit: cover; }
.jago > div { padding: 12px 12px 10px 0; min-width: 0; }
.jago.nop > div { padding-left: 14px; }
.jago small { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--board-on, #7ee2a8); }
.jago p { margin: 4px 0 6px; font: 700 17px/1.3 var(--serif); letter-spacing: -.02em; }
.jago-a { display: flex; gap: 14px; flex-wrap: wrap; }
.jago-a button { border: 0; background: none; padding: 6px 0; min-height: 36px; color: #fff; font: 600 14px var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.jago-a button + button { color: rgba(255,255,255,.7); font-weight: 500; }
.jsh { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 6px; }
.jsh b { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.js { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin-bottom: 4px; }
.js::-webkit-scrollbar { display: none; }
.js-d { flex: 1 0 40px; min-width: 40px; height: 54px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font: 600 15px var(--mono); color: var(--ink-2); cursor: pointer; display: block; box-sizing: border-box; }
.js-d small { font: 500 10px var(--mono); letter-spacing: .06em; }
.js-d.has { color: var(--ink); border-color: var(--rule-2); }
.js-d.has::after { content: ""; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.js-d.today { border-color: var(--ink); border-width: 1.5px; }
.js-d.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jdh { font: 500 11px var(--mono) !important; letter-spacing: .1em !important; text-transform: uppercase; color: var(--ink-2); margin: 18px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--ink); display: flex; gap: 8px; align-items: baseline; }
.jdh small { font: inherit; opacity: .7; }
.jl { list-style: none; margin: 0; padding: 0; }
.jl > li { border-bottom: 1px solid var(--rule); }
.jr { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 12px 0; cursor: pointer; color: var(--ink); }
.jr-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jr-b > b { font: 700 17px/1.3 var(--serif); letter-spacing: -.02em; }
.jr-p { font: 400 15px/1.4 var(--sans); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jr-m { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.jr-m i { font-style: normal; }
.jr-t { font: 500 12px var(--mono); color: var(--ink-2); letter-spacing: .02em; }
.jr-tag { font: 500 12px var(--sans); border: 1px solid var(--rule-2); border-radius: 6px; padding: 1px 7px; color: var(--ink); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.jr-tag.k { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); flex: none; }
.jr > img { flex: none; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.jr mark { background: var(--amber-wash, #fff6dc); color: inherit; border-radius: 3px; padding: 0 1px; }
.jempty { color: var(--ink-2); font: 400 15px/1.5 var(--sans); padding: 18px 0; }
.jfine { color: var(--ink-2); font: 400 13px/1.5 var(--sans); margin: 18px 0 0; }
.jcount { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 8px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.jsrch { margin-top: 0; }
.jpl { list-style: none; margin: 0; padding: 0; }
.jpc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); min-height: 64px; }
.jpc img, .jpc-i { flex: none; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.jpc-i { background: var(--card); display: grid; place-items: center; font: 800 22px var(--serif); }
.jpc > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jpc b { font: 700 17px var(--serif); letter-spacing: -.02em; }
.jpc small { font: 500 12px var(--mono); color: var(--ink-2); }
.jpadd { display: block; width: 100%; margin: 14px 0 0; min-height: 50px; border: 1.5px dashed var(--rule-2); border-radius: 12px; background: none; font: 600 15px var(--sans); color: var(--ink); cursor: pointer; }
.jpnew { margin-top: 14px; }
.jback { margin: 6px 0 0; }
.jback a { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; display: inline-block; padding: 8px 0; }
.jph { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jph h1 { margin: 0; font-size: 34px; line-height: 1.05; min-width: 0; overflow-wrap: anywhere; }
.jph .btn, .nt-head .btn { white-space: nowrap; flex: none; }
.jdoc { margin: 12px 0 0; padding: 14px; border-radius: 14px; background: var(--card); cursor: pointer; font: 400 16px/1.5 var(--sans); }
.jdoc > :first-child { margin-top: 0; }
.jdoc > p:first-child { font: 750 20px/1.25 var(--serif); letter-spacing: -.02em; }
.jdoc h2 { font: 800 20px var(--serif); margin: 12px 0 4px; }
.jdoc h3 { font: 700 17px var(--serif); margin: 10px 0 4px; }
.jdoc p { margin: 0 0 8px; }
.jdoc figure { margin: 10px 0; }
.jdoc figure img { width: 100%; border-radius: 10px; display: block; max-height: 260px; object-fit: cover; }
.jfiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.jfph { border: 0; padding: 0; background: none; cursor: pointer; aspect-ratio: 1; }
.jfph img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.jhide { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); cursor: pointer; }
.jhide span { display: flex; flex-direction: column; gap: 2px; font: 600 16px var(--sans); }
.jhide small { font: 400 13px var(--sans); color: var(--ink-2); }
.jhide input { width: 24px; height: 24px; accent-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .jw:not([hidden]) { animation: jw-in .2s ease-out; } }
@keyframes jw-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- smart tables ---------- */
.jt { position: relative; margin: 14px 0; padding-top: 2px; }
.jt-sc { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule-2); border-radius: 12px; }
.jt table { border-collapse: collapse; width: 100%; font: 400 15px var(--sans); }
.jt th, .jt td { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); padding: 0; text-align: left; vertical-align: middle; }
.jt th:last-child, .jt td:last-child { border-right: 0; }
.jt tbody tr:last-child td { border-bottom: 0; }
.jt th { background: var(--card); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.jt th button { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.jt th button i { font-style: normal; opacity: .5; font-size: 9px; }
.jt th.jt-cadd button { justify-content: center; font: 500 18px var(--sans); color: var(--ink); min-width: 40px; }
.jt td { min-width: 96px; }
.jt td.k-yes, .jt th.k-yes { min-width: 60px; width: 60px; text-align: center; }
.jt td.k-num { min-width: 76px; width: 76px; }
.jt td.k-date { min-width: 132px; width: 132px; }
.jt-in, .jt-pick { display: block; width: 100%; min-height: 44px; border: 0; background: transparent; padding: 0 10px; font: 400 15px var(--sans); color: var(--ink); box-sizing: border-box; outline: none; }
.jt-in:focus, .jt-pick:focus { background: var(--sage-wash, #E9F6EE); }
.jt-in.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.jt-date { font-family: var(--mono); font-size: 13px; }
.jt-yes { width: 22px; height: 22px; margin: 11px auto; display: block; accent-color: var(--sage, #1F9D55); }
.jt-pick { -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 600; font-size: 13px; }
.jt-pick.t0, .jt-tag.t0 { color: #1F6F43; } .jt-pick.t1, .jt-tag.t1 { color: #8A5A00; } .jt-pick.t2, .jt-tag.t2 { color: #2F5BB7; } .jt-pick.t3, .jt-tag.t3 { color: #A1306B; } .jt-pick.t4, .jt-tag.t4 { color: #5B4BB7; }
.jt-tag { font-weight: 600; font-size: 13px; padding: 0 10px; }
.jt-ok { color: var(--sage); font-weight: 700; display: block; text-align: center; }
.jt tfoot td { white-space: nowrap; background: var(--card); font: 600 13px var(--mono); padding: 10px; border-top: 2px solid var(--ink); border-bottom: 0; text-align: right; font-variant-numeric: tabular-nums; }
.jt tfoot td.k-yes { text-align: center; }
.jt-rx { min-width: 36px !important; width: 36px; }
.jt-rx button { width: 36px; min-height: 44px; border: 0; background: none; color: var(--ink-2); font: 400 18px var(--sans); cursor: pointer; opacity: .55; }
.jt-add { margin-top: 6px; min-height: 40px; padding: 0 12px; border: 1.5px dashed var(--rule-2); border-radius: 10px; background: none; font: 600 14px var(--sans); color: var(--ink); cursor: pointer; }
.jt-x { top: -10px; right: -6px; width: 28px; height: 28px; font-size: 16px; z-index: 1; }
.jdoc .jt td { padding: 10px; min-width: 0; }
.jw-col { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.jw-col > input, .jw-lab input { flex: 1; min-width: 0; min-height: 46px; border: 1.5px solid var(--ink); border-radius: 12px; padding: 0 12px; font: 500 16px var(--sans); background: var(--paper); color: var(--ink); }
.jw-lab { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.jw-kinds { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; }
.jw-kinds button { min-height: 40px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
.jw-kinds button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Notes header: search and sort/filter beside + Write ---------- */
.jhead-a { display: flex; align-items: center; gap: 6px; flex: none; }
.jic { width: 44px; height: 44px; border: 1.5px solid var(--rule-2); border-radius: 12px; background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.jic svg, .jhead-q svg, .jsf-line svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.jic.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.jhead-q .jsrch { flex: 0 1 205px; min-width: 0; margin: 0; min-height: 44px; padding: 0 4px 0 12px; }
.jhead-q .jsrch.jq-new { animation: jq-in .18s ease-out; }
.jhead-q .jsrch input { font-size: 16px; }
.jhead-q .jsrch input::-webkit-search-cancel-button { display: none; }
.jq-x { flex: none; width: 36px; height: 36px; border: 0; background: none; font: 400 22px/1 var(--sans); color: var(--ink-2); cursor: pointer; }
@keyframes jq-in { from { opacity: 0; transform: scaleX(.3); transform-origin: right; } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .jhead-q .jsrch { animation: none; } }
.jhead-q .jsrch svg { flex: none; color: var(--ink-2); }
.jsf { border: 1.5px solid var(--ink); border-radius: 14px; padding: 6px 12px 12px; margin: 0 0 12px; }
.jsf-h { margin: 10px 0 6px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.jsf .nt-chips { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.jsf-a { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.jsf-line { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }
.jsf-line > button:first-child { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 0; min-height: 40px; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
.jsf .nt-chip { min-height: 36px; padding: 0 10px; font-size: 11px; }
.jsf-h { margin-top: 8px; }
/* ---------- Notes, simplified (2 Dec 2026, her hand-off) ---------- */
/* photos are small: 84px squares in a row, tap for full screen */
.jw-ed figure { display: inline-block; margin: 6px 8px 6px 0; vertical-align: top; }
.jw-ed figure img { width: 84px; height: 84px; max-height: none; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.jw-ed figure .jw-x { top: -6px; right: -6px; }
.jw-view { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .9); display: grid; place-items: center; padding: 24px; }
.jw-view img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.jw-view button { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 24px; }
/* header: back, more, Done; the date is just shown */
.jw-top { display: flex; align-items: center; gap: 6px; }
.jw-back { border: 0; background: none; padding: 10px 4px; font: 500 16px var(--sans, sans-serif); color: var(--ink, #111); cursor: pointer; min-height: 44px; }
.jw-saved { margin-left: auto; }
.jw-dots { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--ink, #111); cursor: pointer; }
.jw-dots svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.jw-when { margin: 0 16px 6px; font: 400 13px var(--sans, sans-serif); color: var(--ink-2, #666); }
/* the bar: Aa · List · Goal or plan · + ; Aa opens the styles under it */
.jw-bar { display: block; }
.jw-tools { display: grid; grid-template-columns: auto 1fr 1.4fr auto; gap: 4px; }
.jw-bar .jw-tl { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; font: 600 15px var(--sans, sans-serif); width: auto; }
.jw-bar .jw-tl svg { width: 20px; height: 20px; }
.jw-bar .jw-aa { font: 700 17px var(--serif, Georgia, serif); }
.jw-bar .jw-aa.jw-on { background: var(--ink, #111); color: var(--paper, #fff); }
.jw-bar .jw-plus { font: 400 26px var(--sans, sans-serif); }
.jw-fmtp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 0 2px; }
.jw-bar .jw-fmtp .jw-fw { height: 46px; border-radius: 12px; background: var(--card, #fff); border: 1px solid var(--rule, rgba(0, 0, 0, .1)); font: 600 15px var(--sans, sans-serif); }
.jw-bar .jw-fmtp .jw-ft { font: 400 18px var(--serif, Georgia, serif); }
.jw-sh { margin: 12px 0 4px; font: 600 13px var(--sans, sans-serif); color: var(--ink-2, #666); }
/* the Notes page */
.jn .jsrch { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 0 12px; min-height: 46px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--rule, rgba(0, 0, 0, .1)); }
.jn .jsrch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; color: var(--ink-2, #666); }
.jn .jsrch input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 400 16px var(--sans, sans-serif); color: var(--ink, #111); }
.jchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.jchips .nt-chip { min-height: 40px; padding: 0 16px; border-radius: 999px; }
.jchips .nt-chip[aria-pressed="true"] { background: var(--ink, #111); color: var(--paper, #fff); border-color: var(--ink, #111); }
.jchip-add { width: 40px; padding: 0 !important; font-size: 20px; }
.jn .jl .jr img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.jn .jr-p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jfab { position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px; background: #FF8A3D; color: #2B1640; font: 600 16px var(--sans, sans-serif); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); cursor: pointer; }
.jfab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.jn { padding-bottom: 96px; }
.jfs-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; }
.jfs { width: min(560px, 100%); background: var(--paper, #fff); border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); }
.jfs-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--rule, rgba(0, 0, 0, .15)); margin: 0 auto 12px; }
.jfs h2 { margin: 0 0 12px; font: 400 24px var(--serif, Georgia, serif); }
.jfs input { width: 100%; min-height: 50px; border-radius: 14px; border: 1.5px solid var(--ink, #111); background: var(--card, #fff); color: var(--ink, #111); padding: 0 14px; font: 400 17px var(--sans, sans-serif); }
.jfs-fine { font: 400 13px var(--sans, sans-serif); color: var(--ink-2, #666); margin: 8px 0 0; }
.jfs-go { width: 100%; margin-top: 14px; min-height: 52px; }
.jfs-del { display: block; margin: 12px auto 0; color: #c0392b !important; }
html.look-board .jchips .nt-chip { font: 500 15px "Funnel Sans", var(--sans, sans-serif) !important; text-transform: none !important; letter-spacing: 0 !important; }
/* above Assist on the website (the iPhone app has no Assist, so it sits lower there) */
.jfab { bottom: calc(150px + env(safe-area-inset-bottom)); }
html.lw-app .jfab { bottom: calc(92px + env(safe-area-inset-bottom)); }
