/* Notes on a passage, desktop: the page opens to the right. The text column slides left only as far as it must, and the
   notes lie flat in the space it leaves: the same paper, a hairline edge, no card, no shadow (the user, 2026-11-19).
   Only when the screen has room for it (threadflat.js decides); otherwise the note opens as before. Works with threadflat.js, which sets --thshift and the classes. */
  /* moved as one layer (transform), not by "left": repainting it every frame left streaks of the drop cap behind in Arc (2026-11-19) */
@media (min-width:900px){html.th-flat body #art{transform:translateX(0);transition:transform .55s cubic-bezier(.65,0,.35,1)}}
  html.th-flat.th-open body #art{transform:translateX(calc(var(--thshift,0px) * -1));will-change:transform}
  html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet){position:fixed!important;top:0!important;bottom:0!important;right:0!important;left:auto!important;
    width:var(--thw,420px)!important;max-height:none!important;margin:0!important;border:0!important;border-left:1px solid rgba(60,48,36,.14)!important;
    border-radius:0!important;box-shadow:none!important;background:var(--paper,#FCFBF9)!important;padding:96px 40px 48px!important;
    overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(28,27,25,.2) transparent;z-index:30!important;
    transition:none!important;animation:none!important;transform:none!important;opacity:1!important}
  html.th-flat.night body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet){border-left-color:rgba(243,237,226,.12)!important}
  /* flat inside too: the passage, then the notes as plain text on the page */
  html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-q,.rbn-q){font-size:17px;line-height:1.5;margin:0 0 28px;padding-right:36px}
  html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-mecm,.rbt-me,.cm){background:transparent!important;box-shadow:none!important;border-radius:0!important;padding-left:0!important;padding-right:0!important}
  html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) .rbt-x{position:absolute!important;top:84px!important;right:28px!important}
/* the passage as a quotation: a small quote mark, then the words; no coloured bar */
html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-q,.rbn-q){border:0!important;padding:0!important;margin:0 0 30px!important;
  font:normal 400 18px/1.5 "EB Garamond",Georgia,serif!important;font-style:normal!important;color:var(--ink,#1C1B19)!important;background:none!important}
html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-x,.rbn-x,[data-rb="closenote"]){display:none!important}
/* the tab on the column's edge: push it to the right to close */
.th-tab{position:fixed;top:50%;right:calc(var(--thw,420px) - 14px);z-index:31;width:28px;height:56px;margin-top:-28px;display:grid;place-items:center;padding:0;
  border:1px solid rgba(60,48,36,.16);border-radius:14px;background:var(--paper,#FCFBF9);color:var(--ink3,#8a8076);cursor:pointer;
  opacity:0;transition:opacity .25s,color .2s,border-color .2s}
.th-tab.in{opacity:1;transition-delay:.35s,0s,0s}
.th-tab:hover{color:var(--ink,#1C1B19);border-color:rgba(60,48,36,.32)}
.th-tab .ic{width:16px;height:16px}
html.night .th-tab{border-color:rgba(243,237,226,.16)}
@media (max-width:899px){.th-tab{display:none}}
/* the quote mark is drawn by the stylesheet, so it survives the text being replaced */
html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-q,.rbn-q)::before{content:"\201C";display:block;height:30px;margin:0 0 2px -2px;
  font:normal 400 56px/1 "EB Garamond",Georgia,serif;color:#B3242B;opacity:.85}
html.th-flat.night body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-q,.rbn-q)::before{color:#E2584F}
/* "Everyone" sits on the right of the name line, like "Only you" on your own note, never on top of the name */
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) .rbt-mecm > .rbt-vis{display:flex!important;position:absolute!important;top:31px!important;right:0!important;left:auto!important;margin:0!important;z-index:1}
html.th-flat body :is(#rbnote,#rbnote-out):is(#rbnote,#rbnote-out) .rbn-q{display:block!important;-webkit-line-clamp:unset!important;line-clamp:none!important;overflow:visible!important;max-height:none!important;white-space:normal!important;text-overflow:clip!important}
/* one left edge for everything, and scale (the user, 2026-11-19): the quote big and higher up, then each comment big
   under it; the avatar and name above the words, the words starting on the same line as the quote */
html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet){padding-top:64px!important}
html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-q,.rbn-q){
  font-size:27px!important;line-height:1.38!important;letter-spacing:-.003em;margin:0 0 44px!important}
html.th-flat body :is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):is(#rbthread,#rbthread-out,#rbnote,#rbnote-out):not(.sheet) :is(.rbt-q,.rbn-q)::before{
  font-size:96px!important;height:52px!important;margin:0 0 0 -4px!important}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) :is(.rbt-mecm,.rbt-others) > .cm{display:block!important;margin:0 0 34px!important}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) :is(.rbt-mecm,.rbt-others) > .cm > .av{float:left;margin:0 10px 0 0!important}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) :is(.rbt-mecm,.rbt-others) > .cm > .cb{display:block!important;margin:0!important;padding:0!important}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) :is(.rbt-mecm,.rbt-others) > .cm > .cb > .cmw{min-height:32px;display:flex!important;align-items:center}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) :is(.rbt-mecm,.rbt-others) > .cm > .cb > p{clear:both;margin:12px 0 10px!important;font-size:21px!important;line-height:1.45!important}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) :is(.rbt-mecm,.rbt-others) > .cm > .cb > .ca{margin-left:-8px!important}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) .rbt-me > p{font-size:21px!important;line-height:1.45!important;margin:12px 0 10px!important}
html.th-flat body :is(#rbthread,#rbthread-out):not(.sheet) .rbt-mecm > .rbt-vis{top:37px!important}
html.th-flat body :is(#rbnote,#rbnote-out):not(.sheet) textarea{font-size:21px!important;line-height:1.45!important}
/* while a passage's notes are open in the column, its bubble beside the text steps aside */
html.th-flat body #art .rbub{transition:opacity .25s}
html.th-flat.th-open body #art .rbub.on{opacity:0!important;pointer-events:none!important}
/* the box for writing: laid out like a posted comment (avatar and You, the words at the comment's size, then the controls) */
html.th-flat body :is(#rbnote,#rbnote-out):not(.sheet) .th-who{display:flex;align-items:center;gap:10px;min-height:32px;font:600 14px "EB Garamond",Georgia,serif;color:var(--ink,#1C1B19)}
html.th-flat body :is(#rbnote,#rbnote-out):not(.sheet) textarea{display:block;width:100%;margin:12px 0 6px!important;padding:0!important;border:0!important;outline:0!important;box-shadow:none!important;
  background:transparent!important;resize:none;min-height:0!important;color:var(--ink,#1C1B19)}
html.th-flat body :is(#rbnote,#rbnote-out):not(.sheet) .rbn-f{border-top:0!important;margin:0 0 0 -8px!important;padding:0!important}
html.th-flat body :is(#rbnote,#rbnote-out) .th-who :is(.rbt-av,.av){width:32px!important;height:32px!important;font-size:13px!important;flex:none}
html.th-flat body :is(#rbnote,#rbnote-out):not(.sheet) textarea{field-sizing:content;height:auto!important;min-height:1.45em!important}
/* your own posted note looks exactly like the box you wrote it in, and like everyone else's comment */
html.th-flat body :is(#rbthread,#rbthread-out):is(#rbthread,#rbthread-out):not(.sheet) .rbt-me > header{display:flex!important;align-items:center;gap:10px;min-height:32px;font:600 14px "EB Garamond",Georgia,serif}
html.th-flat body :is(#rbthread,#rbthread-out):is(#rbthread,#rbthread-out):not(.sheet) .rbt-me :is(.rbt-av,.av){width:32px!important;height:32px!important;font-size:13px!important}
html.th-flat body :is(#rbthread,#rbthread-out):is(#rbthread,#rbthread-out):not(.sheet) .rbt-me > p{font:400 21px/1.45 "EB Garamond",Georgia,serif!important;margin:12px 0 10px!important;color:var(--ink,#1C1B19)!important}
html.th-flat body :is(#rbthread,#rbthread-out):is(#rbthread,#rbthread-out):not(.sheet) .rbt-me > footer{margin-left:-8px!important}
/* Text size panel: no margin change (that repainted the text every frame); the text slides as one layer, only if needed */
@media (min-width:821px){html:root body:has(#rblook:not([hidden])) main.readp.readp{padding-right:20px!important}}
html:root body main.readp.readp{transition:none!important}
@media (min-width:900px){html body #art{transition:transform .3s cubic-bezier(.2,.7,.2,1)}
  html.aa-open:not(.th-open) body #art{transform:translateX(calc(var(--aashift,0px) * -1))}}
/* Text size and page: the same flat column on the right as the notes, the text sliding over in step; no card, no shadow, no pop */
html.th-flat:root body :is(#rblook,#rblook-out):is(#rblook,#rblook-out):is(#rblook,#rblook-out).rblook.th-big{position:fixed!important;top:0!important;bottom:0!important;right:0!important;left:auto!important;
  width:var(--thw,420px)!important;max-height:none!important;height:auto!important;margin:0!important;border:0!important;border-left:1px solid rgba(60,48,36,.14)!important;border-radius:0!important;
  box-shadow:none!important;background:var(--paper,#FCFBF9)!important;padding:72px 40px 48px!important;overflow-y:auto!important;z-index:30!important;
  animation:none!important;transition:none!important;transform:none!important;opacity:1!important;scrollbar-width:thin}
html.th-flat.night:root body :is(#rblook,#rblook-out).rblook.th-big{border-left-color:rgba(243,237,226,.12)!important}
/* the close tab, in the style of the panel's own buttons: a soft grey rounded tile, no outline */
.th-tab{border:0!important;border-radius:10px!important;width:30px!important;height:30px!important;margin-top:-15px!important;right:calc(var(--thw,420px) - 15px)!important;
  background:color-mix(in srgb,var(--ink,#1C1B19) 6%,var(--paper,#FCFBF9))!important;color:var(--ink3,#8a8076)!important}
.th-tab:hover{background:color-mix(in srgb,var(--ink,#1C1B19) 11%,var(--paper,#FCFBF9))!important;color:var(--ink,#1C1B19)!important}
html.night .th-tab{background:color-mix(in srgb,#F3EDE2 10%,var(--paper,#141414))!important;color:rgba(243,237,226,.8)!important}
/* the small card in the corner: flat, a hairline edge, no shadow, no pop */
html:root body #rblook#rblook#rblook.rblook:not(.th-big){box-shadow:none!important;border:1px solid rgba(60,48,36,.14)!important;border-radius:0!important;animation:th-fade .2s ease-out!important}
html.night:root body #rblook#rblook#rblook.rblook:not(.th-big){border-color:rgba(243,237,226,.14)!important}
@keyframes th-fade{from{opacity:0}to{opacity:1}}
.th-tab .ic{width:15px!important;height:15px!important}
/* the card grows upward with More options, up to just under the top bar, and scrolls inside after that */
html:root body #rblook#rblook#rblook.rblook:not(.th-big){max-height:calc(100vh / var(--z,1) - 110px)!important}
