.wn-citation-overlay{--lc-paper:var(--qe-paper,#fff);--lc-surface:var(--qe-surface,#f6f1f8);--lc-raised:var(--qe-raised,#fff);--lc-ink:var(--qe-ink,#233847);--lc-action:var(--qe-action,#92278f);--lc-action-ink:var(--qe-action-ink,#fff);--lc-control:var(--qe-control,#778398);--lc-line:var(--qe-line,#b7bec9);--lc-focus:var(--qe-focus,#92278f);}
.wn-citation-overlay{position:fixed;inset:0;z-index:2147483000;background:rgba(15,22,32,.42);display:flex;justify-content:flex-end;font-family:var(--wn-pagella-face,"TeX Gyre Pagella",sans-serif);color:var(--lc-ink,#233847)}
.wn-citation-panel{box-sizing:border-box;width:min(560px,100%);max-height:100dvh;overflow:auto;background:var(--lc-paper,#fff);padding:24px;box-shadow:-8px 0 35px #0003;overscroll-behavior:contain}
.wn-citation-panel *{box-sizing:border-box;font-family:inherit}
.wn-citation-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.wn-citation-header h2{margin:0;font-size:1.65rem;color:inherit}.wn-citation-panel h3{font-size:1.2rem;line-height:1.25;margin:0 0 8px;color:inherit}
.wn-citation-panel button,.wn-citation-panel input,.wn-citation-actions a{min-height:44px;font-size:1rem;border-radius:6px}.wn-citation-panel button,.wn-citation-actions a{padding:10px 14px;border:1px solid var(--lc-action,#92278f);background:var(--lc-action,#92278f);color:var(--lc-action-ink,#fff);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.wn-citation-panel button:disabled{opacity:.55;cursor:default}.wn-citation-panel button:focus-visible,.wn-citation-panel input:focus-visible,.wn-citation-actions a:focus-visible{outline:3px solid var(--lc-focus,#92278f);outline-offset:3px}
.wn-citation-panel .wn-citation-close{background:transparent;color:inherit;border-color:var(--lc-control,#778398)}.wn-citation-selection{margin:20px 0;padding:12px 16px;border-left:3px solid var(--lc-action,#92278f);background:var(--lc-surface,#f6f1f8);overflow-wrap:anywhere}.wn-citation-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.wn-citation-search label{grid-column:1/-1}.wn-citation-search input{width:100%;min-width:0;padding:9px;border:1px solid var(--lc-control,#778398);color:inherit;background:var(--lc-raised,#fff)}
.wn-citation-result{margin:18px 0;padding:18px;border:1px solid var(--lc-line,#b7bec9);border-radius:12px;background:linear-gradient(100deg,var(--lc-surface,#f6f1f8),var(--lc-paper,#fff));overflow-wrap:anywhere}.wn-citation-source-details,.wn-citation-location,.wn-citation-note{font-size:.95rem;line-height:1.4;color:inherit}.wn-citation-support{font-weight:bold;margin:12px 0 6px}.wn-citation-evidence{white-space:pre-wrap;margin:8px 0;padding:12px 14px;border-left:2px solid var(--lc-control,#778398);background:var(--lc-paper,#fff);line-height:1.5}.wn-citation-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.wn-citation-actions a{background:transparent;color:var(--lc-action,#92278f)}.wn-citation-warning{border-left:3px solid #b26d15;padding-left:10px}.wn-citation-status{min-height:24px}
@media(max-width:420px){.wn-citation-panel{padding:16px}.wn-citation-search{grid-template-columns:1fr}.wn-citation-result{padding:14px}.wn-citation-header{gap:8px}.wn-citation-header h2{font-size:1.4rem}}

html[data-wn-theme="dark"] .wn-citation-overlay,body[data-wn-theme="dark"] .wn-citation-overlay,html.skin-theme-clientpref-night:not([data-wn-theme]) .wn-citation-overlay{--lc-paper:var(--qe-paper,#1b2430);--lc-surface:var(--qe-surface,#27303e);--lc-raised:var(--qe-raised,#2d3746);--lc-ink:var(--qe-ink,#f3eff6);--lc-action:var(--qe-action,#d9b3eb);--lc-action-ink:var(--qe-action-ink,#23162b);--lc-control:var(--qe-control,#9ba7bd);--lc-line:var(--qe-line,#4f5665);--lc-focus:var(--qe-focus,#d9b3eb);}

.wn-citation-panel a{color:var(--lc-action,#92278f);text-underline-offset:.15em}.wn-citation-panel a:focus-visible,.wn-citation-panel summary:focus-visible{outline:3px solid var(--lc-focus,#92278f);outline-offset:3px}.wn-citation-panel a:not(.wn-citation-actions a){display:inline-flex;align-items:center;min-height:44px}.wn-citation-placement{margin-top:16px}

/* Keep the citation preview and its primary action within the visible viewport. */
.wn-citation-overlay.wn-citation-inline{position:fixed;inset:auto;display:block;background:transparent}
.wn-citation-inline .wn-citation-panel{width:100%;max-height:calc(100dvh - 24px);display:flex;flex-direction:column;overflow:hidden;padding:20px;border:1px solid var(--lc-control);border-radius:12px;box-shadow:0 8px 28px #0002;background:linear-gradient(105deg,var(--lc-paper),var(--lc-surface));font-size:1rem;line-height:1.45}
.wn-citation-inline .wn-citation-header{margin-bottom:12px}.wn-citation-inline .wn-citation-header h2{font-size:1.35rem}.wn-citation-inline .wn-citation-close{min-width:44px;padding:8px 12px}
.wn-citation-inline details{margin:8px 0}.wn-citation-inline summary{cursor:pointer;min-height:44px;align-content:center;color:var(--lc-action)}
.wn-citation-inline .wn-citation-selection{margin:8px 0}.wn-citation-inline .wn-citation-search{margin-top:8px}.wn-citation-inline .wn-citation-status{margin:12px 0;min-height:0}
.wn-citation-inline .wn-citation-result{margin:12px 0;padding:16px;border-radius:8px;background:var(--lc-paper)}
.wn-citation-inline .wn-citation-result h3{font-size:1.12rem}.wn-citation-inline .wn-citation-source-details{margin:4px 0 12px}.wn-citation-inline .wn-citation-evidence{padding:8px 12px;line-height:1.45}
.wn-citation-inline .wn-citation-source-context{margin-bottom:0}.wn-citation-inline .wn-citation-source-context summary{font-size:.95rem}.wn-citation-inline .wn-citation-note{margin:8px 0 0}.wn-citation-inline .wn-citation-undo{margin-left:8px;background:transparent;color:var(--lc-action)}
.wn-citation-inline .wn-citation-result a{overflow-wrap:anywhere}.wn-citation-inline .wn-citation-results:empty{display:none}
button.wn-librarian-book-trigger,a.wn-librarian-book-trigger{box-sizing:border-box;display:inline-flex!important;align-items:center;justify-content:center;min-width:44px;max-width:44px;width:44px;min-height:44px;height:44px;padding:10px!important;font-size:0!important;line-height:0!important;overflow:hidden;border:1px solid var(--qe-control,#898d81);border-radius:7px;color:var(--qe-action,#842780);background:var(--qe-raised,#fffdf8);vertical-align:middle;cursor:pointer}
button.wn-librarian-book-trigger::before,a.wn-librarian-book-trigger::before{content:"";display:block;width:24px;height:24px;flex:0 0 24px;background:currentColor;mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20stroke%3D%22%23000%22%20d%3D%22M12%207.5V17M12%207.5C12%205.84315%2010.6569%204.5%209%204.5H2V5.58531C2%2010.1813%201.49701%2014.7635%200.5%2019.25V19.5H9C10.6569%2019.5%2012%2020.8431%2012%2022.5M12%207.5C12%205.84315%2013.3431%204.5%2015%204.5H22V5.58531C22%2010.1813%2022.503%2014.7635%2023.5%2019.25V19.5H15C13.3431%2019.5%2012%2020.8431%2012%2022.5M12%2022.5V23%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center / contain no-repeat;-webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2032%2032%22%3E%0A%3C%21--%0ARefactoring%20UI%20Icons%20v1.0.2%2C%20icon-book-open.svg.%20Original%20path%20geometry.%0AColour%20and%20surrounding%20whitespace%20adapted%20for%20WikiNative%20Studio%20staging.%0A%0ACopyright%20%28c%29%20Refactoring%20UI%20Inc.%0A%0AThis%20License%20Agreement%20%28%E2%80%9Cthe%20Agreement%E2%80%9D%29%20between%20you%2C%20the%20licensee%2C%20and%20Refactoring%20UI%20Inc.%20%28the%20%E2%80%9CCompany%E2%80%9D%29%2C%20a%20corporation%20organized%20and%20existing%20under%20the%20laws%20of%20Ontario.%20%20The%20Company%20owns%20the%20icons%20%28the%20%E2%80%9CProduct%E2%80%9D%29%20delivered%20under%20this%20Agreement.%20This%20Agreement%20grants%20you%20a%20non-exclusive%2C%20non-transferable%20right%20to%20use%20and%20incorporate%20the%20Product%20in%20personal%20and%20commercial%20projects.%0A%0AYou%20agree%20as%20follows%3A%0A%0A1.%20%20Scope%20of%20use%0A%0A%20%20%20%201.%20Use%20and%20incorporate%20the%20Product%20in%20personal%20and%20commercial%20projects%20including%20web%20applications%2C%20websites%2C%20native%20mobile%20applications%2C%20and%20printed%20materials%2C%20etc.%0A%0A%20%20%20%202.%20You%20may%20incorporate%20the%20Product%20in%20open-source%20projects%2C%20and%20are%20granted%20permission%20to%20include%20the%20Product%20in%20publicly%20readable%20repositorities%20as%20needed.%0A%20%0A%20%20%20%203.%20You%20may%20modify%20the%20Product%20to%20better%20serve%20your%20projects.%0A%0A%20%20%20%204.%20You%20are%20granted%20unlimited%20usage%20of%20the%20Product.%0A%0A%20%20%20%205.%20If%20an%20organization%20is%20the%20licensee%2C%20all%20employees%20of%20the%20organization%20may%20use%20the%20same%20license.%0A%0A2.%20%20Limitations%20and%20non-use%0A%20%20%20%20%0A%20%20%20%201.%20You%20may%20not%20redistribute%2C%20sublicense%20or%20resell%20the%20Product.%0A%20%20%20%20%0A%20%20%20%202.%20You%20may%20not%20distribute%2C%20license%20or%20sell%20modified%20versions%20of%20the%20Product.%0A%0AThe%20above%20copyright%20notice%20and%20this%20permission%20notice%20shall%20be%20included%20in%20all%20copies%20or%20substantial%20portions%20of%20the%20Software.%0A%0ATHE%20SOFTWARE%20IS%20PROVIDED%20%22AS%20IS%22%2C%20WITHOUT%20WARRANTY%20OF%20ANY%20KIND%2C%0AEXPRESS%20OR%20IMPLIED%2C%20INCLUDING%20BUT%20NOT%20LIMITED%20TO%20THE%20WARRANTIES%20OF%0AMERCHANTABILITY%2C%20FITNESS%20FOR%20A%20PARTICULAR%20PURPOSE%20AND%0ANONINFRINGEMENT.%20IN%20NO%20EVENT%20SHALL%20THE%20AUTHORS%20OR%20COPYRIGHT%20HOLDERS%20BE%0ALIABLE%20FOR%20ANY%20CLAIM%2C%20DAMAGES%20OR%20OTHER%20LIABILITY%2C%20WHETHER%20IN%20AN%20ACTION%0AOF%20CONTRACT%2C%20TORT%20OR%20OTHERWISE%2C%20ARISING%20FROM%2C%20OUT%20OF%20OR%20IN%20CONNECTION%0AWITH%20THE%20SOFTWARE%20OR%20THE%20USE%20OR%20OTHER%20DEALINGS%20IN%20THE%20SOFTWARE.%0A%0A--%3E%0A%20%20%3Ctitle%3ELibrarian%3A%20open%20book%3C%2Ftitle%3E%0A%20%20%3Cg%20transform%3D%22translate%284%204%29%22%20fill%3D%22%2392278f%22%3E%0A%20%20%20%20%3Cpath%20opacity%3D%220.65%22%20d%3D%22M12%2021a2%202%200%200%201-1.41-.59l-.83-.82A2%202%200%200%200%208.34%2019H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1h4a5%205%200%200%201%204%202v16z%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M12%2021V5a5%205%200%200%201%204-2h4a1%201%200%200%201%201%201v14a1%201%200%200%201-1%201h-4.34a2%202%200%200%200-1.42.59l-.83.82A2%202%200%200%201%2012%2021z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A") center / contain no-repeat}
button.wn-librarian-book-trigger:focus-visible,a.wn-librarian-book-trigger:focus-visible{outline:3px solid var(--qe-focus,#842780);outline-offset:3px}
button.wn-librarian-book-trigger:hover,a.wn-librarian-book-trigger:hover{background:var(--qe-surface,#f3f5f0)}
@media(max-width:420px){.wn-citation-inline .wn-citation-panel{padding:14px}.wn-citation-inline .wn-citation-result{padding:12px}}

@keyframes wn-native-librarian-invitation{0%,72%,100%{transform:rotate(0)}80%{transform:rotate(-9deg)}89%{transform:rotate(7deg)}95%{transform:rotate(-2deg)}}
@media(prefers-reduced-motion:no-preference){body:not(:has([aria-label="Play background motion"])):not([data-motion="paused"]):not([data-wn-motion="paused"]) :is(.wn-scratch-citation-search,.cg-compose-librarian).wn-librarian-invite:not(.was-used):not(:hover):not(:focus):not(:focus-visible)::before{animation:wn-native-librarian-invitation 2.7s ease-in-out infinite}}

.wn-citation-inline .wn-citation-header,
.wn-citation-inline .wn-citation-primary { flex: 0 0 auto; }
.wn-citation-inline .wn-citation-scroll {
    min-height: 0; overflow: auto; overscroll-behavior: contain;
    scrollbar-gutter: stable; scroll-padding: 6px;
}
.wn-citation-inline .wn-citation-content { display: flow-root; overflow-wrap: anywhere; }
.wn-citation-inline .wn-citation-primary:empty { display: none; }
.wn-citation-inline .wn-citation-primary:not(:empty) { padding-top: 8px; border-top: 1px solid var(--lc-line); }

/* Citation actions use Studio's positive and neutral colours in both themes. */
.wn-citation-overlay {
    --citation-positive: var(--nv-good, var(--qe-good, #365c58));
    --citation-positive-bg: var(--nv-good-bg, var(--qe-good-surface, #edf5ef));
}
:is(html[data-wn-theme="dark"], body[data-wn-theme="dark"], html.skin-theme-clientpref-night:not([data-wn-theme])) .wn-citation-overlay {
    --citation-positive: var(--nv-good, var(--qe-good, #b9d9cf));
    --citation-positive-bg: var(--nv-good-bg, var(--qe-good-surface, #283c35));
}
/* Studio Spaces sets its legacy Add and Undo controls to the generic gradient with !important.
   Scope the semantic action colours and typography to the labelled Librarian controls. */
:root .wn-citation-overlay .wn-citation-panel button.wn-citation-action[data-citation-action] {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .45em;
    min-height: 44px;
    max-width: 100%;
    margin: 0;
    padding: .45rem .65rem;
    border: 1px solid var(--citation-button-line, transparent) !important;
    border-radius: 4px !important;
    background: var(--citation-button-bg, transparent) !important;
    color: var(--citation-button-ink, var(--lc-action)) !important;
    font: var(--citation-button-weight, 400) 1rem/1.25 var(--wn-pagella-face,"TeX Gyre Pagella",sans-serif) !important;
    text-align: start;
    overflow-wrap: anywhere;
}
.wn-citation-action[data-citation-action="add"] {
    --citation-button-bg: var(--citation-positive-bg);
    --citation-button-ink: var(--citation-positive);
    --citation-button-line: var(--citation-positive);
    --citation-button-weight: 700;
}
.wn-citation-action[data-citation-action]:not(:disabled):hover {
    --citation-button-bg: var(--lc-surface);
    --citation-button-line: var(--lc-control);
}
.wn-citation-action[data-citation-action="add"]:not(:disabled):hover {
    --citation-button-bg: var(--citation-positive);
    --citation-button-line: var(--citation-positive);
    --citation-button-ink: var(--citation-positive-bg);
}
.wn-citation-panel .wn-citation-action:focus-visible {
    outline: 2px solid var(--lc-focus);
    outline-offset: 2px;
}
.wn-citation-saved-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: .15rem .4rem;
    align-items: start;
    max-width: 100%;
    padding: .2rem;
}
:root .wn-citation-overlay .wn-citation-panel button.wn-citation-action[data-citation-action]::before {
    content: "";
    flex: 0 0 1.125em;
    width: 1.125em;
    height: 1.125em;
    background-color: currentColor;
    mask: var(--citation-glyph) center / contain no-repeat;
}
.wn-citation-action[data-citation-action="add"] {
    --citation-glyph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20stroke%3D%22%23000%22%20d%3D%22M12%207.5V17M12%207.5C12%205.84315%2010.6569%204.5%209%204.5H2V5.58531C2%2010.1813%201.49701%2014.7635%200.5%2019.25V19.5H9C10.6569%2019.5%2012%2020.8431%2012%2022.5M12%207.5C12%205.84315%2013.3431%204.5%2015%204.5H22V5.58531C22%2010.1813%2022.503%2014.7635%2023.5%2019.25V19.5H15C13.3431%2019.5%2012%2020.8431%2012%2022.5M12%2022.5V23%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
}
.wn-citation-action[data-citation-action="review"] {
    --citation-glyph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20stroke%3D%22%23000%22%20d%3D%22M6.10621%207.05338C7.63349%205.42428%209.76694%204.5%2012%204.5C14.2331%204.5%2016.3665%205.42428%2017.8938%207.05338L20.5%2010C21.5%2011%2022.724%2012%2024%2012C22.724%2012%2021.5%2013%2020.5%2014L17.8938%2016.9466C16.3665%2018.5757%2014.2331%2019.5%2012%2019.5C9.76694%2019.5%207.63348%2018.5757%206.10621%2016.9466L3.5%2014C2.5%2013%201.27603%2012%200%2012C1.27603%2012%202.5%2011%203.5%2010L6.10621%207.05338Z%22%3E%3C%2Fpath%3E%3Cpath%20stroke%3D%22%23000%22%20d%3D%22M9.5%2012C9.5%2010.6193%2010.6193%209.5%2012%209.5C13.3807%209.5%2014.5%2010.6193%2014.5%2012C14.5%2013.3807%2013.3807%2014.5%2012%2014.5C10.6193%2014.5%209.5%2013.3807%209.5%2012Z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
}
.wn-citation-action[data-citation-action="another"] {
    --citation-glyph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20stroke%3D%22%23000%22%20d%3D%22M9.5%209.5V0.5H9.75L10.0194%200.553884C10.6715%200.684309%2011.335%200.75%2012%200.75C12.665%200.75%2013.3285%200.684309%2013.9806%200.553884L14.25%200.5H14.5V9.5H23.5V9.75L23.4461%2010.0194C23.3157%2010.6715%2023.25%2011.335%2023.25%2012C23.25%2012.665%2023.3157%2013.3285%2023.4461%2013.9806L23.5%2014.25V14.5H14.5V23.5H14.25L13.9806%2023.4461C13.3285%2023.3157%2012.665%2023.25%2012%2023.25C11.335%2023.25%2010.6715%2023.3157%2010.0194%2023.4461L9.75%2023.5H9.5V14.5H0.5V14.25L0.553884%2013.9806C0.684309%2013.3285%200.75%2012.665%200.75%2012C0.75%2011.335%200.684309%2010.6715%200.553884%2010.0194L0.5%209.75V9.5H9.5Z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
}
.wn-citation-action[data-citation-action="return"] {
    --citation-glyph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20stroke%3D%22%23000%22%20d%3D%22M16%205C16%205.74152%2016.7331%206.8496%2017.4746%207.78062C18.4291%208.9793%2019.5689%2010.0268%2020.8762%2010.8262C21.8551%2011.4248%2023.0444%2012%2024%2012M24%2012C23.0444%2012%2021.8551%2012.5752%2020.8762%2013.1738C19.5689%2013.9732%2018.4291%2015.0207%2017.4746%2016.2194C16.7331%2017.1504%2016%2018.2585%2016%2019M24%2012H0%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
}
.wn-citation-action[data-citation-action="undo"] {
    --citation-glyph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20stroke%3D%22%23000%22%20d%3D%22M16%205C16%205.74152%2016.7331%206.8496%2017.4746%207.78062C18.4291%208.9793%2019.5689%2010.0268%2020.8762%2010.8262C21.8551%2011.4248%2023.0444%2012%2024%2012M24%2012C23.0444%2012%2021.8551%2012.5752%2020.8762%2013.1738C19.5689%2013.9732%2018.4291%2015.0207%2017.4746%2016.2194C16.7331%2017.1504%2016%2018.2585%2016%2019M24%2012H0%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
}
@media (forced-colors: active) {
    .wn-citation-action[data-citation-action] { --citation-button-line: ButtonText; }
    .wn-citation-panel .wn-citation-action::before { forced-color-adjust: none; background-color: ButtonText; }
    .wn-citation-panel .wn-citation-action:disabled::before { background-color: GrayText; }
}
@media (max-width: 360px) {
    .wn-citation-saved-actions { grid-template-columns: minmax(0, max-content); }
}
@media (max-height: 480px) {
    .wn-citation-primary:has(.wn-citation-saved-actions) { max-height: 46dvh; overflow-y: auto; }
}

/* The live region announces results. Warnings, errors and save confirmations remain visible. */
.wn-citation-inline .wn-citation-status:has(> .wn-citation-count) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* A named toolbar control in the private WikiText editor. */
body button:is(.wn-scratch-citation-search,.wn-source-librarian-selection).wn-librarian-book-trigger {
    width:auto;max-width:none;min-height:44px;height:auto;gap:.4rem;padding:.3rem .65rem!important;
    font:inherit!important;line-height:1.25!important;font-weight:600!important;
}
button:is(.wn-scratch-citation-search,.wn-source-librarian-selection).wn-librarian-book-trigger::before {width:1.1rem;height:1.1rem;flex-basis:1.1rem;}
.wn-source-librarian-selection { position:fixed;z-index:90;box-shadow:0 2px 8px rgba(0,0,0,.2); }
body .wn-source-librarian-selection[hidden] { display:none!important; }
.wn-scratch-librarian-status:not(:empty) {display:inline-block;margin:.35rem .5rem;}

.wn-generated-citation {
    margin-block: .8rem;
}
.wn-generated-citation label {
    display: grid;
    gap: .35rem;
}
.wn-generated-citation textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 5.5rem;
    resize: vertical;
    padding: .5rem;
    font: inherit;
    color: inherit;
    background: var(--lc-paper);
    border: 1px solid var(--lc-line);
    border-radius: .35rem;
}
.wn-generated-status {
    margin: .4rem 0 0;
}
.wn-generated-status:empty {
    margin: 0;
}
sup.reference a.wn-citation-revealed:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}
.wn-citation-panel .wn-catalogue-browse { margin-top: .75rem; }
.wn-historical-catalogue ul { margin: 0; padding: 0; list-style: none; }
.wn-historical-catalogue li { padding-block: .6rem; border-bottom: 1px solid var(--lc-line, currentColor); }
.wn-historical-catalogue a { text-underline-offset: .15em; text-decoration-thickness: 1px; }
.wn-historical-catalogue .wn-catalogue-author { display: block; font-size: .92em; }

/* In-place reading keeps the draft and its discussions at their current passages. */
dialog.librarian-embedded-reader {
    --reader-paper: #fffdf8; --reader-ink: #302934; --reader-muted: #555b56;
    --reader-accent: #842780; --reader-line: #d8ded7; --reader-surface: #faf9f5;
    box-sizing: border-box; position: fixed; inset: 0; margin: auto;
    inline-size: min(56rem, calc(100% - 1.5rem)); block-size: min(52rem, calc(100dvh - 1.5rem));
    max-width: 100%; max-height: 100%; padding: 0; overflow: hidden;
    border: 1px solid var(--reader-line); border-radius: .6rem;
    background: var(--reader-paper); color: var(--reader-ink);
    font: 400 1rem/1.5 'TeX Gyre Pagella', Palatino, serif; color-scheme: light;
}
dialog.librarian-embedded-reader[open] { display: flex; flex-direction: column; }
dialog.librarian-embedded-reader[data-reader-theme="dark"] {
    --reader-paper: #1b191e; --reader-ink: #fff9ec; --reader-muted: #cec8c2;
    --reader-accent: #ebbaea; --reader-line: #49464a; --reader-surface: #29252b; color-scheme: dark;
}
dialog.librarian-embedded-reader::backdrop { background: rgb(20 15 22 / 56%); }
.librarian-embedded-reader .librarian-reader-header {
    display: flex; position: static; align-items: center; justify-content: space-between; gap: .8rem;
    padding: .45rem 1rem; border: 0; border-bottom: 1px solid var(--reader-line);
    background: var(--reader-surface); color: var(--reader-ink); font: inherit;
}
.librarian-embedded-reader button {
    font: inherit; color: var(--reader-ink); background: var(--reader-surface);
    border: 1px solid var(--reader-line); border-radius: .32rem; min-height: 2.75rem; padding: .25rem .8rem; cursor: pointer;
}
.librarian-embedded-reader :is(button,a,input):focus-visible { outline: 2px solid var(--reader-accent); outline-offset: 2px; }
.librarian-embedded-reader .librarian-reader-heading {
    flex: 0 0 auto; max-height: 36%; overflow: auto; padding: .7rem clamp(1rem, 3vw, 1.6rem);
    border-bottom: 1px solid var(--reader-line);
}
.librarian-embedded-reader .librarian-reader-heading h2 {
    margin: 0; font: 400 clamp(1.12rem, 2.5vw, 1.45rem)/1.2 'TeX Gyre Pagella', Palatino, serif; color: inherit;
}
.librarian-embedded-reader .librarian-reader-locator { margin: .3rem 0 0; font: inherit; font-size: .9rem; color: var(--reader-muted); }
.librarian-embedded-reader .librarian-reader-heading a { color: var(--reader-accent); text-decoration-thickness: 1px; text-underline-offset: .14em; font-size: .9rem; }
.librarian-reader-body { flex: 1 1 0; overflow: auto; overscroll-behavior: contain; min-height: 0; position: relative; }
.librarian-reader-body .librarian-source-text {
    display: block; margin: auto; max-width: 62ch; padding: 1rem clamp(1rem, 3vw, 1.6rem) 2rem;
    font: inherit; line-height: 1.6; color: var(--reader-ink); background: var(--reader-paper);
}
.librarian-source-text p, .librarian-source-text ol { margin: 0 0 .9rem; color: inherit; font: inherit; }
.librarian-source-text h3 { margin: 1.2rem 0 .5rem; font: inherit; font-size: 1.2rem; }
.librarian-source-text .librarian-cited-passage { border-inline-start: 2px solid var(--reader-accent); padding-inline-start: .75rem; }
.librarian-reader-body .librarian-loading { margin: 1rem; }
.librarian-reader-body .librarian-credit { color: var(--reader-muted); font-size: .9rem; }
.librarian-credit a { color: var(--reader-accent); }
@media (max-height: 460px) {
    .librarian-embedded-reader .librarian-reader-heading { max-height: 25%; padding-block: .35rem; }
}
