:root { --acc: #7e22ce; --accd: #6b21a8; --accbg: #f5ecfc }
.stage { flex: 1; display: flex; flex-direction: column; padding: 18px 22px; gap: 12px; min-width: 0; overflow: hidden; background: #e9ecf0 }
.bar { display: flex; gap: 8px; align-items: center }
.bar .nav { width: 34px; padding: 0; font-size: 20px; line-height: 1 }
.bar .nav:disabled { opacity: .35 }
.bar .pgn { font-size: 13px; font-weight: 600; color: var(--tx2); min-width: 92px; text-align: center; white-space: nowrap }
.bar input[type=search] { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line); padding: 0 10px; font: inherit; font-size: 14px; background: var(--panel); color: var(--tx) }
.bar input[type=search]:focus { outline: none; border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc) }
.paper { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; padding-bottom: 30px }
/* the page: OneNote's own look - Calibri 11 pt on white, a title with a line under it and the date */
.pg { background: #fff; width: min(100%, 820px); padding: 40px 56px 56px; box-shadow: 0 1px 3px rgba(0,0,0,.14); font: 11pt/1.4 Calibri, Carlito, 'Segoe UI', Arial, sans-serif; color: #1b1b1b; flex: none; min-height: 60%; overflow-wrap: anywhere }
.pg .pt { font: 20pt/1.25 'Calibri Light', Calibri, Carlito, 'Segoe UI', sans-serif; margin: 0; padding-bottom: 6px; border-bottom: 1px solid #c8c8c8; min-height: 1.25em }
.pg .pt.untitled { color: #8a8a8a }
.pg .pd { font-size: 9pt; color: #777; margin: 6px 0 22px }
.pg .op { margin: 0 0 2px; min-height: 1.4em; white-space: pre-wrap; display: flex; gap: 6px; align-items: baseline }
.pg .op .mk { flex: none; min-width: 16px; text-align: right; color: inherit }
.pg .op .tx { flex: 1; min-width: 0 }
.pg .op .bx { flex: none; width: 13px; height: 13px; border: 1.5px solid #5b5fc7; display: inline-flex; align-items: center; justify-content: center; position: relative; top: 2px; background: #fff }
.pg .op .bx.done::after { content: ''; width: 7px; height: 4px; border-left: 2px solid #5b5fc7; border-bottom: 2px solid #5b5fc7; transform: rotate(-45deg) translate(0, -1px) }
.pg .op.done .tx { color: #777 }
.pg .op .tg { flex: none; font-size: 8pt; font-weight: 700; color: var(--accd); background: var(--accbg); padding: 1px 5px; position: relative; top: -1px }
.pg .gap { height: 16px }
.pg a { color: #1a56db; text-decoration: underline }
.pg .lk { color: #1a56db; text-decoration: underline dotted; cursor: help }
.pg .jump { color: #1a56db; text-decoration: underline; cursor: pointer }
.pg mark { background: #ffe066; color: inherit; padding: 0 }
.pg mark.cur { background: #ffb020 }
.pg table.ot { border-collapse: collapse; margin: 6px 0 10px; font-size: inherit; max-width: 100% }
.pg table.ot td { padding: 3px 7px; vertical-align: top; border: 1px solid transparent; min-width: 30px }
.pg table.ot.bd td { border-color: #a6a6a6 }
.pg table.ot td .op:last-child { margin-bottom: 0 }
.pg .im { margin: 4px 0 8px; line-height: 0 } .pg .im img { max-width: 100%; height: auto; display: inline-block }
.pg .nopic { display: inline-flex; gap: 8px; align-items: center; border: 1px dashed #b5b5b5; padding: 10px 14px; color: #666; font-size: 10pt; line-height: 1.3; margin: 4px 0 8px }
.pg .att { display: inline-flex; gap: 10px; align-items: center; border: 1px solid #c9c9c9; background: #fafafa; padding: 7px 12px 7px 10px; margin: 4px 0 8px; font: 600 10pt/1.3 Inter, 'Segoe UI', sans-serif; color: #222; cursor: pointer; max-width: 100% }
.pg .att:hover { border-color: var(--acc); background: var(--accbg) }
.pg .att svg { flex: none; width: 22px; height: 26px; fill: none; stroke: var(--acc); stroke-width: 1.4 }
.pg .att small { display: block; font-weight: 500; color: #777; font-size: 9pt }
.pg .att.miss { cursor: default; border-style: dashed; color: #888; background: #fff }
.pg .att.miss svg { stroke: #aaa }
.pg .empty { color: #8a8a8a; font-style: italic; margin-top: 10px }
.paper .msg { color: var(--tx2); font-weight: 600; padding: 40px; text-align: center; max-width: 520px }
/* side: the page list, grouped by section */
#pages { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; margin: 0 -6px }
#pages .sh { font-size: 11.5px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 6px 4px; display: flex; gap: 6px; align-items: center }
#pages .sh:first-child { padding-top: 0 }
#pages .sh i { width: 10px; height: 10px; flex: none }
#pages button { all: unset; box-sizing: border-box; padding: 6px 8px; font-size: 13.5px; cursor: pointer; border-left: 3px solid transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 8px; align-items: baseline }
#pages button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis }
#pages button small { flex: none; color: var(--tx3); font-size: 11.5px; font-weight: 600 }
#pages button:hover { background: var(--accbg) }
#pages button.on { border-left-color: var(--acc); background: var(--accbg); font-weight: 700; color: var(--accd) }
#pages button.sub { padding-left: 22px } #pages button.sub2 { padding-left: 36px }
#pages button.untitled span { color: var(--tx3); font-style: italic }
#pages .none { font-size: 13px; color: var(--tx3); padding: 6px 8px }
#pages .bad { font-size: 12.5px; color: var(--bad); padding: 4px 8px 8px; line-height: 1.4 }
.go { padding: 18px 22px; display: flex; flex-direction: column; gap: 8px } .go .btn { width: 100% }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px } .row2 .btn { width: 100% }
.seg.sm button { height: 32px; font-size: 13px }
.est .n { overflow-wrap: anywhere; font-size: 22px; line-height: 1.2 }
.err a { color: inherit; font-weight: 700 }
@media (min-width: 901px) { .app:has(#vWork:not([hidden])) { height: 100vh; min-height: 0 } #vWork { overflow: hidden } }
@media (max-width: 900px) {
  .stage { padding: 12px 10px; overflow: visible }
  .bar { flex-wrap: wrap } .bar input[type=search] { flex-basis: 100%; order: 5 } .bar #addBtn { margin-left: auto }
  .paper { overflow: visible }
  .pg { padding: 22px 18px 32px; min-height: 0 }
  .pg .pt { font-size: 17pt }
  #pages { max-height: 40vh }
}
@media print {
  .top, .side, .bar, .strip, .foot, footer { display: none !important }
  .stage { padding: 0; background: #fff } .paper { overflow: visible }
  .pg { box-shadow: none; width: 100%; padding: 0 }
}
