:root {
  --paper: #f9f7f1;
  --sidebar: #f1eee5;
  --surface: #fffdf8;
  --ink: #353a34;
  --muted: #84877a;
  --line: #e2dfd4;
  --red: #974b3f;
  --red-soft: #eee1d9;
  --sage: #7c8974;
  --sage-soft: #e9ede3;
  --shadow: 0 12px 42px #353a3412;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #232724;
  --sidebar: #1c211e;
  --surface: #2b302b;
  --ink: #e2e0d5;
  --muted: #a1a69a;
  --line: #3c433c;
  --red: #d69b88;
  --red-soft: #493830;
  --sage: #a6b396;
  --sage-soft: #354133;
  --shadow: 0 12px 42px #0003;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--red);
}
button,
input,
select,
textarea {
  outline-offset: 4px;
}
*:focus-visible {
  outline: 2px solid var(--red);
}
button {
  background: none;
  border: 0;
}
input,
textarea,
select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 11px 12px;
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  line-height: 1.65;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
select {
  cursor: pointer;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 400;
}
h1 {
  font-size: 48px;
  line-height: 1.14;
  letter-spacing: -1.4px;
}
h2 {
  font-size: 28px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 21px;
}
p {
  line-height: 1.7;
}
em {
  font-weight: 400;
}
label {
  display: block;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.1px;
}
label > input,
label > select,
label > textarea {
  margin-top: 7px;
}
kbd {
  font: 11px var(--sans);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 5px;
  color: var(--muted);
}
.icon {
  flex-shrink: 0;
  vertical-align: middle;
}
.button,
.small-button,
.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.button {
  padding: 12px 17px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.button:hover,
.small-button:hover {
  border-color: var(--red);
  color: var(--red);
}
.primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}
.primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.small {
  padding: 8px 12px;
}
.small-button {
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 7px 11px;
  border-radius: 4px;
}
.small-button .icon {
  width: 15px;
  height: 15px;
}
.text-button {
  color: var(--red);
  padding: 7px 0;
  font-size: 12px;
}
.text-button:hover {
  text-decoration: underline;
}
.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--red-soft);
  color: var(--red);
}
.eyebrow,
.nav-label,
.margin-label,
.group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.7px;
  line-height: 1.5;
  text-transform: uppercase;
}
.eyebrow {
  color: var(--red);
}
.eyebrow span {
  color: var(--muted);
  padding: 0 6px;
}
.muted,
.help {
  color: var(--muted);
}
.help {
  font-size: 12px;
  line-height: 1.65;
}
.error-text {
  color: var(--red);
  font-size: 13px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.count {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 400;
  padding: 3px 7px;
  margin-left: 7px;
  color: var(--muted);
  background: var(--sidebar);
  border: 1px solid var(--line);
  border-radius: 4px;
  vertical-align: middle;
}
.sidebar {
  width: 238px;
  background: var(--sidebar);
  height: 100dvh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 38px 21px 0;
  border-right: 1px solid var(--line);
  z-index: 20;
}
.brand {
  display: block;
  font-family: var(--serif);
  font-size: 35px;
  letter-spacing: -1.6px;
  color: var(--red);
  padding-left: 10px;
}
.brand span,
.login-brand span {
  display: block;
  font: 8px var(--sans);
  letter-spacing: 2.4px;
  color: var(--muted);
  margin-top: 11px;
  padding-left: 2px;
}
.sidebar-rule {
  height: 1px;
  background: var(--line);
  margin: 29px 10px 27px;
}
.nav-label {
  color: var(--muted);
  font-size: 9px;
  margin: 0 0 12px 12px;
  letter-spacing: 1.5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 11px;
  margin-bottom: 4px;
  font-size: 12px;
  border-radius: 5px;
  color: #72796c;
}
.nav-item .icon {
  width: 18px;
  height: 18px;
}
.nav-item.active {
  background: var(--red-soft);
  color: var(--red);
  font-weight: 600;
}
.nav-item:hover {
  background: var(--line);
}
.nav-count {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.8;
}
.sidebar-collections {
  margin-top: 31px;
}
.sidebar-collections a {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 11px;
  padding: 8px 13px;
  color: var(--muted);
}
.tiny-diamond {
  color: var(--sage);
  font-size: 15px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.sidebar-ornament {
  text-align: center;
  color: var(--sage);
  font-size: 29px;
}
.sidebar-bottom > p {
  text-align: center;
  font: italic 13px/1.7 var(--serif);
  color: var(--muted);
  margin: 10px 0 28px;
}
.profile {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 10px;
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 20px 2px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #d9ddce;
  color: #5e6854;
  font: 16px var(--serif);
}
.profile > span:nth-child(2) {
  font-size: 11px;
}
.profile small {
  display: block;
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 5px;
}
.profile-dots {
  margin-left: auto;
}
.workspace {
  margin-left: 238px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 43px;
  gap: 20px;
}
.breadcrumb {
  color: var(--muted);
  font-size: 11px;
}
.breadcrumb span {
  margin: 0 13px;
  color: var(--line);
}
.top-actions {
  display: flex;
  gap: 22px;
  align-items: center;
}
.search-button {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.search-button .icon {
  width: 16px;
  height: 16px;
}
.search-button kbd {
  margin-left: 32px;
}
.mobile-menu {
  display: none;
}
#main {
  padding: 44px 48px 58px;
  max-width: 1550px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0 0 33px;
}
.page-heading h1 {
  margin: 13px 0 13px;
}
.page-heading p {
  color: var(--muted);
  font: 15px/1.7 var(--serif);
}
.page-heading > .button {
  align-self: center;
}
.workspace-footer {
  border-top: 1px solid var(--line);
  padding: 20px 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.5px;
}
.workspace-footer i {
  margin: 0 8px;
  font-style: normal;
}
#save-state {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0;
}
.status-dot {
  width: 5px;
  height: 5px;
  background: var(--sage);
  border-radius: 50%;
  display: inline-block;
}
.status-dot.error {
  background: var(--red);
}
.web-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 39px;
}
.overview-intro {
  padding: 30px 33px;
  background: linear-gradient(105deg, var(--sage-soft), var(--surface));
}
.overview-intro .eyebrow {
  font-size: 9px;
  color: var(--sage);
}
.overview-intro h2 {
  font-size: 32px;
  line-height: 1.2;
  margin: 16px 0 10px;
}
.overview-intro h2 em {
  color: var(--sage);
}
.overview-intro > p {
  font-size: 11px;
  color: var(--muted);
}
.notebook-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 39px;
  margin-top: 25px;
}
.notebook-stats > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.notebook-stats strong {
  font: 27px var(--serif);
}
.notebook-stats span {
  font-size: 9px;
  color: var(--muted);
}
.overview-collections {
  padding: 29px 30px 18px;
  border-left: 1px solid var(--line);
}
.overview-collections > .eyebrow {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 12px;
}
.collection-row {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.collection-row:last-child {
  border-bottom: 0;
}
.roman {
  font: italic 19px var(--serif);
  color: var(--red);
  width: 21px;
}
.collection-row strong {
  display: block;
  font: 19px var(--serif);
}
.collection-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.collection-row > .icon {
  margin-left: auto;
  width: 16px;
  color: var(--muted);
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-top h2 {
  font-size: 26px;
}
.inline-search {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
.inline-search .icon {
  width: 16px;
  height: 16px;
}
.inline-search input {
  border: 0;
  background: none;
  padding: 6px 0;
  margin: 0;
  font-size: 12px;
  max-width: 190px;
}
.filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filter {
  font-size: 10px;
  padding: 7px 11px;
  border: 1px solid transparent;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 4px;
}
.filter:hover {
  background: var(--sidebar);
}
.filter.selected {
  border-color: var(--line);
  background: var(--surface);
  color: var(--red);
}
.group-label {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  margin: 24px 0 13px;
}
.group-label span {
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.7;
}
.page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.page-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 17px 18px 15px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 117px;
  transition:
    border-color 0.15s,
    transform 0.15s;
  min-width: 0;
}
.page-card:hover {
  border-color: var(--sage);
  transform: translateY(-2px);
  color: var(--ink);
}
.card-type {
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.page-card h3 {
  margin: 12px 0 14px;
  font-size: 20px;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.card-meta {
  font-size: 9px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}
.card-meta > span {
  font-size: 13px;
  color: var(--sage);
}
.written-dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: var(--sage);
}
.first-page {
  width: 100%;
  text-align: left;
  border: 1px dashed #c8cbbd;
  border-radius: 5px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 17px;
}
.dashed-icon {
  background: var(--sage-soft);
  color: var(--sage);
  padding: 10px;
  border-radius: 50%;
}
.first-page strong {
  font: 19px var(--serif);
}
.first-page small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.first-page > .icon {
  margin-left: auto;
  color: var(--sage);
}
.document-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -12px 0 39px;
}
.back-link {
  color: var(--muted);
  font-size: 11px;
}
.document-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.document-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) 180px;
  gap: 64px;
  max-width: 1080px;
  margin: auto;
}
.document > .eyebrow {
  margin-bottom: 8px;
}
.page-title {
  font: 48px/1.2 var(--serif);
  letter-spacing: -1.5px;
  border: 0;
  background: none;
  padding: 0;
  margin: 0 0 27px;
  outline-offset: 8px;
  border-radius: 0;
}
.page-title[readonly] {
  cursor: default;
}
.page-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.page-fields:empty {
  display: none;
}
.page-fields label {
  font-size: 10px;
  color: var(--muted);
}
.page-fields input,
.page-fields select {
  padding: 7px 8px;
  font-size: 12px;
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.writing-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.writing-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.writing-section h2 {
  font-size: 25px;
  color: var(--red);
}
.section-edit {
  color: var(--muted);
  padding: 5px;
  opacity: 0.45;
}
.section-edit .icon {
  width: 15px;
  height: 15px;
}
.writing-section:hover .section-edit {
  opacity: 1;
}
.entry-add {
  color: var(--red);
  font-size: 12px;
  white-space: nowrap;
}
.entry-add .icon {
  width: 15px;
}
.section-entries {
  display: grid;
  gap: 14px;
}
.writing-entry {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 2px 5px #353a3405;
  scroll-margin-top: 85px;
}
.entry-target {
  border-color: var(--sage);
}
.entry-heading,
.card-filter-heading,
.card-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.entry-heading {
  margin-bottom: 8px;
}
.entry-dates {
  display: flex;
  flex-wrap: wrap;
  column-gap: 14px;
  row-gap: 2px;
  color: var(--muted);
  font: 10px/1.5 var(--sans);
}
.entry-updated {
  opacity: 0.75;
}
.writing-entry .section-edit {
  opacity: 1;
}
.entry-placeholder {
  width: 100%;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  text-align: left;
  font-family: var(--serif);
}
.entry-placeholder:hover {
  opacity: 1;
  border-color: var(--sage);
}
.card-filters {
  padding: 18px 0 10px;
  border-bottom: 1px solid var(--line);
}
.card-filter-heading {
  margin-bottom: 12px;
}
.card-filter-heading .help {
  margin: 0;
  font-size: 10px;
}
.card-filter-controls {
  display: grid;
  grid-template-columns: minmax(100px, 1.5fr) repeat(2, minmax(115px, 1fr));
  gap: 10px;
}
.card-filter-controls label {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  gap: 6px;
  margin: 0;
}
.card-filter-controls input {
  min-width: 0;
  width: 100%;
  padding: 8px;
  font-size: 11px;
}
.card-filter-summary {
  min-height: 32px;
  color: var(--muted);
  font-size: 10px;
}
.card-filter-summary .text-button {
  font-size: 10px;
  white-space: nowrap;
}
.card-filter-summary [hidden] {
  display: none;
}
@media (max-width: 1100px) {
  .card-filter-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-filter-controls .card-search {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .writing-entry {
    padding: 14px;
  }
  .writing-entry .editor-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .writing-entry .editor-footer > div {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
}
.editable-content {
  min-height: 52px;
  font: 16px/1.85 var(--serif);
  cursor: text;
  overflow-wrap: anywhere;
  white-space: normal;
}
.writing-placeholder {
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
  opacity: 0.65;
}
.inline-editor {
  background: transparent;
  padding: 12px;
  font: 16px/1.85 var(--serif);
  min-height: 140px;
  resize: vertical;
  border-color: var(--sage);
  overflow: hidden;
}
.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 10px var(--sans);
  padding: 8px 0;
  color: var(--muted);
  gap: 10px;
}
.editor-footer i {
  margin: 0 8px;
}
.wiki-link {
  color: var(--red);
  border-bottom: 1px solid var(--red-soft);
}
.citation {
  font-family: var(--sans);
  font-size: 0.8em;
  color: var(--sage);
  border-bottom: 1px dotted var(--sage);
}
.passage-ref {
  color: var(--red);
  border-bottom: 1px dotted var(--red-soft);
}
.unresolved {
  color: var(--muted);
  border-bottom: 1px dashed var(--muted);
}
.document-margin {
  padding-top: 10px;
}
.margin-label {
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.document-margin > a {
  display: block;
  color: var(--muted);
  font-size: 11px;
  padding: 7px 0;
}
.document-margin > a:hover {
  color: var(--red);
}
.margin-tip {
  border-top: 1px solid var(--line);
  padding-top: 25px;
  margin-top: 24px;
  color: var(--muted);
}
.margin-tip > span {
  font: 24px var(--serif);
  color: var(--sage);
}
.margin-tip p {
  font: italic 13px/1.7 var(--serif);
  margin-top: 10px;
}
.margin-tip kbd {
  font-style: normal;
}
.passage-index {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.passage-index select {
  font-size: 11px;
  padding: 8px;
}
.passage-index .source-card {
  padding: 14px 0;
}
.passage-index .source-card h4 {
  font-size: 16px;
}
.passage-index .source-card p {
  font-size: 11px;
}
.passage-index .source-card .eyebrow {
  font-size: 7px;
  letter-spacing: 0.8px;
}
.backlinks {
  padding-top: 34px;
  margin-top: 15px;
}
.backlinks h2 {
  margin: 10px 0 22px;
}
.backlinks > p {
  font: italic 14px/1.7 var(--serif);
}
.source-card {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.source-card:last-child {
  border-bottom: 0;
}
.source-card .eyebrow {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
}
.source-card h4 {
  font-size: 19px;
  margin: 8px 0;
}
.source-card p {
  font: 14px/1.7 var(--serif);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.source-card:hover h4 {
  color: var(--red);
}
.collection-books {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 0;
}
.collection-books a {
  font: 13px var(--serif);
  border: 1px solid var(--line);
  padding: 7px 9px;
  border-radius: 3px;
}
.moment-list > div {
  display: flex;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font: 14px var(--serif);
}
.moment-list > div .icon-button {
  margin-left: auto;
}
.moment-list + .text-button {
  margin-bottom: 13px;
}
.commentary .note-card {
  margin: 15px 0;
}
.commentary + .text-button {
  margin-bottom: 15px;
}
.library-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 24px 27px;
  background: var(--sage-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-bottom: 27px;
}
.library-summary > .icon {
  color: var(--sage);
  width: 27px;
  height: 27px;
}
.library-summary span {
  font-size: 12px;
}
.library-summary strong {
  font: 24px var(--serif);
  margin-right: 5px;
}
.library-note {
  margin-left: auto;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
  font-size: 14px !important;
}
.inventory-tools {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 23px;
}
.inventory-tools > .inline-search {
  margin-right: auto;
}
.filter-select {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.filter-select select {
  margin: 0;
  font-size: 11px;
  width: auto;
  max-width: 160px;
  padding: 8px 26px 8px 9px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th button {
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
}
td {
  padding: 20px 12px;
  border-bottom: 1px solid var(--line);
}
td:first-child {
  font: 18px var(--serif);
  min-width: 190px;
}
td:nth-child(2) {
  min-width: 120px;
}
.type-chip {
  font-size: 9px;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 4px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.favorites-tools {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.favorites-tools > label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
}
.favorites-tools select {
  width: 150px;
  margin: 0;
  font-size: 11px;
  padding: 8px;
}
.favorites-tools > span {
  margin-left: auto;
  font: italic 13px var(--serif);
}
.favorites-list {
  max-width: 800px;
  margin: 24px auto;
}
.favorite-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.favorite-star {
  color: var(--red);
  padding-top: 2px;
}
.favorite-card > div {
  flex: 1;
}
.favorite-card .passage-ref {
  font-size: 11px;
}
.favorite-card h3 {
  margin-top: 9px;
  font-size: 25px;
}
.favorite-card p {
  font: 16px/1.7 var(--serif);
  color: var(--muted);
  margin-top: 9px;
}
.favorite-card .icon-button {
  margin-left: auto;
}
.empty-state {
  padding: 55px 20px;
  text-align: center;
  max-width: 550px;
  margin: 0 auto;
}
.empty-symbol {
  font: 38px var(--serif);
  color: var(--sage);
}
.empty-state h3 {
  font-size: 26px;
  margin: 15px 0 12px;
}
.empty-state p {
  font: 15px/1.8 var(--serif);
  color: var(--muted);
  max-width: 380px;
  margin: 0 auto 17px;
}
#main.reader-main {
  padding: 25px 30px 40px;
  max-width: 1700px;
}
.reader-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.reader-location {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reader-location select {
  width: auto;
  font-size: 12px;
  background: transparent;
  padding: 8px;
  border: 0;
}
.reader-location #reader-book {
  max-width: 170px;
}
.translation {
  font-size: 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 5px;
  border-radius: 3px;
}
.reader-toolbar form {
  display: flex;
  align-items: center;
  margin-left: auto;
  max-width: 200px;
}
.reader-toolbar form input {
  background: none;
  border: 0;
  font-size: 11px;
}
.reader-toolbar form .icon {
  width: 15px;
}
.reader-actions {
  display: flex;
  gap: 8px;
}
.reader-actions .icon {
  width: 15px;
  height: 15px;
}
.read-active {
  background: var(--sage-soft);
  color: var(--sage);
  border-color: var(--sage);
}
.reader-title {
  text-align: center;
  padding: 43px 0 32px;
}
.reader-title h1 {
  font-size: 54px;
  margin: 16px 0 13px;
}
.reader-title h1 > span {
  font-style: italic;
  color: var(--red);
  margin-left: 7px;
}
.reader-title > p {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--muted);
}
.reader-grid {
  display: grid;
  grid-template-columns: minmax(135px, 1fr) minmax(340px, 580px) minmax(
      180px,
      1fr
    );
  gap: 30px;
  align-items: start;
}
.scripture {
  position: relative;
  padding: 0 8px 25px;
  font: 19px/1.95 var(--serif);
}
.verse {
  position: relative;
  padding: 7px 4px 7px 22px;
  border-radius: 4px;
  transition: background 0.2s;
}
.verse.selected {
  background: var(--red-soft);
}
.verse-number {
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--red);
  font: 9px var(--sans);
  padding: 3px;
  line-height: 1.7;
}
.verse-text {
  white-space: pre-wrap;
}
.chapter-initial {
  font: 70px/0.9 var(--serif);
  float: left;
  color: var(--red);
  margin: 12px 14px 8px 20px;
}
.verse:first-of-type .verse-number {
  display: none;
}
.net-designation {
  font: 10px var(--sans);
  color: var(--muted);
  text-align: right;
  margin-top: 20px;
}
.note-marker {
  display: none;
}
.vocabulary-word {
  border-bottom: 1px dotted var(--sage);
  color: inherit;
}
.right-margin,
.left-margin {
  padding-top: 13px;
  min-width: 0;
}
.aligned-notes {
  display: flow-root;
}
.margin-empty {
  font: italic 13px/1.75 var(--serif);
  color: var(--muted);
}
.left-margin > .source-card {
  padding: 15px 0;
}
.left-margin > .source-card .eyebrow {
  font-size: 7px;
}
.left-margin > .source-card h4 {
  font-size: 17px;
}
.left-margin > .source-card p {
  font-size: 12px;
}
.reader-margin-rule {
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}
.blank-margin {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  color: var(--muted);
}
.blank-margin > span {
  color: var(--sage);
}
.blank-margin h3 {
  font-size: 22px;
  line-height: 1.3;
  margin: 14px 0;
}
.blank-margin p {
  font: 13px/1.8 var(--serif);
}
.note-card {
  border-left: 2px solid var(--red-soft);
  padding: 0 0 12px 15px;
  margin-bottom: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 9px;
  color: var(--red);
  margin-bottom: 6px;
}
.note-top .icon-button {
  width: 23px;
  height: 23px;
}
.note-top .icon {
  width: 12px;
  height: 12px;
}
.prose {
  font: 14px/1.8 var(--serif);
}
blockquote {
  border-left: 2px solid var(--sage);
  padding: 2px 0 2px 14px;
  margin: 14px 0;
  font: italic 15px/1.8 var(--serif);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.note-card blockquote {
  padding-left: 8px;
  margin: 8px 0;
  font-size: 12px;
}
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.note-tags a {
  font-size: 8px;
  border-radius: 3px;
  background: var(--sage-soft);
  color: var(--sage);
  padding: 4px 6px;
}
.linked-passages {
  margin-top: 30px;
}
.chapter-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding: 24px 0;
  gap: 12px;
}
.chapter-navigation > a {
  font-size: 11px;
  color: var(--muted);
}
.chapter-navigation .icon {
  width: 13px;
}
.net-credit {
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  text-align: center;
  margin: 15px auto;
}
.net-credit a {
  text-decoration: underline;
}
.selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: var(--sidebar);
  border-radius: 5px;
  margin: 0;
  position: fixed;
  z-index: 5;
  width: max-content;
  max-width: min(440px, calc(100vw - 24px));
  box-shadow: var(--shadow);
}
.selection-bar > span {
  font: 13px var(--serif);
  color: var(--red);
  width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}
.text-link-picker {
  width: 100%;
  min-width: 0;
  max-height: min(390px, calc(100dvh - 100px));
  overflow-y: auto;
}
.text-link-picker input {
  margin-top: 5px;
}
.text-link-picker .picker-item span,
#text-link-create {
  overflow-wrap: anywhere;
  white-space: normal;
}
.text-loading {
  padding: 30px 0;
  min-height: 300px;
}
.text-loading > span {
  display: block;
  height: 14px;
  background: var(--line);
  margin: 16px 0;
  border-radius: 4px;
  animation: pulse 1.6s infinite;
}
.text-loading > span:nth-child(2) {
  width: 90%;
}
.text-loading > span:nth-child(3) {
  width: 75%;
}
.text-loading p {
  font: italic 14px var(--serif);
  color: var(--muted);
  margin-top: 25px;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
.coverage-summary {
  display: flex;
  align-items: center;
  gap: 60px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 29px 34px;
  border-radius: 5px;
  margin-bottom: 30px;
}
.coverage-summary > div {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.coverage-summary strong {
  font: 37px var(--serif);
}
.coverage-summary strong small {
  font-size: 19px;
  color: var(--muted);
}
.coverage-summary span {
  font-size: 10px;
  color: var(--muted);
}
.coverage-note {
  font: italic 17px/1.7 var(--serif);
  color: var(--sage);
  margin-left: auto;
}
.coverage-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.legend {
  display: flex;
  gap: 16px;
  font-size: 9px;
  color: var(--muted);
}
.legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 9px;
  height: 9px;
  display: block;
  background: var(--line);
  border-radius: 2px;
}
.legend i.read {
  background: var(--sage);
}
.legend i.annotated {
  background: var(--red);
}
.coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 42px;
  row-gap: 25px;
}
.coverage-book > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.coverage-book a {
  font: 17px var(--serif);
}
.coverage-book span {
  font-size: 9px;
  color: var(--muted);
}
.chapter-cells {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.chapter-cell {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: var(--line);
  font: 8px var(--sans) !important;
  color: var(--muted);
  border: 1px solid transparent;
}
.chapter-cell.read {
  background: var(--sage);
  color: var(--paper);
}
.chapter-cell.annotated {
  background: var(--red);
  color: var(--paper);
}
.chapter-cell:hover {
  border-color: var(--red);
  color: var(--ink);
}
.librarian-notice {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--sage);
  font-size: 11px;
  background: var(--sage-soft);
  padding: 15px 19px;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 35px;
}
.librarian-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
}
.ask-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 5px;
  align-self: start;
}
.ask-panel h2 {
  font-size: 34px;
  line-height: 1.2;
  margin: 19px 0;
}
.ask-panel h2 em {
  color: var(--sage);
}
.ask-panel > p {
  font: 14px/1.7 var(--serif);
  color: var(--muted);
}
.ask-panel textarea {
  min-height: 100px;
  margin: 22px 0 13px;
  font: 15px/1.7 var(--serif);
}
.ask-panel > .help {
  font: 10px/1.7 var(--sans);
  margin-top: 15px;
}
.ask-panel blockquote footer {
  font: 10px var(--sans);
  margin-top: 10px;
  color: var(--red);
}
.suggestions-panel .section-top h2 {
  font-size: 26px;
}
.suggestion-card {
  padding: 18px;
  background: var(--sage-soft);
  border: 1px dashed var(--sage);
  border-radius: 4px;
  margin-bottom: 12px;
}
.suggestion-label {
  font-size: 7px;
  letter-spacing: 1.3px;
  color: var(--sage);
}
.suggestion-card p {
  font: 15px/1.7 var(--serif);
  margin: 9px 0;
}
.suggestion-card p strong {
  font-weight: 400;
}
.suggestion-card > div {
  display: flex;
  gap: 17px;
  align-items: center;
}
.suggestions-panel .empty-state {
  padding: 30px 15px;
}
.suggestions-panel .empty-state h3 {
  font-size: 22px;
}
.related-panel {
  border-top: 1px solid var(--line);
  padding-top: 30px;
  margin-top: 35px;
}
.related-panel h2 {
  margin: 10px 0 20px;
}
.related-panel .inline-search {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.related-panel .inline-search input {
  max-width: none;
}
.related-panel #related-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 35px;
}
#modal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 27px 30px;
  width: 510px;
  max-width: calc(100vw - 28px);
  max-height: 88dvh;
  box-shadow: 0 20px 100px #0002;
  overflow: auto;
}
#modal.wide {
  width: 680px;
}
#modal::backdrop {
  background: #17201766;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 19px;
}
.modal-header h2 {
  font-size: 29px;
}
.modal-header > .icon-button {
  margin-right: -8px;
}
#modal form > label {
  margin-top: 17px;
}
#modal form > p {
  margin-top: 12px;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 25px;
}
.modal-footer > .text-button {
  margin-right: auto;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.note-attachment {
  margin-bottom: 16px;
}
.note-attachment summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  color: var(--red);
  font: 16px var(--serif);
}
.note-attachment summary::-webkit-details-marker {
  display: none;
}
.note-change-label {
  flex-shrink: 0;
  font: 11px var(--sans);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.note-attachment-fields {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.note-attachment-fields > label {
  display: block;
  margin-top: 12px;
}
.note-attachment-fields > label[hidden] {
  display: none;
}
.note-selection-quote {
  max-height: 100px;
  overflow-y: auto;
  margin: 0 0 16px;
  font-size: 15px;
}
.note-attachment[open] + .note-selection-quote {
  display: none;
}
#margin-note-text {
  margin-top: 0;
}
#note-form .modal-footer {
  margin-top: 18px;
}
.search-modal-input {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-modal-input input {
  margin: 0;
  font-size: 15px;
}
.search-modal-input .icon {
  color: var(--muted);
}
#global-results {
  margin-top: 22px;
}
.search-result {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.search-result strong {
  font: 20px var(--serif);
}
.search-result > .icon {
  margin-left: auto;
  width: 15px;
  color: var(--muted);
}
.search-passage {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  font-size: 13px;
  padding: 17px;
  background: var(--red-soft);
  border-radius: 4px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.settings-row:last-child {
  border-bottom: 0;
}
.settings-row strong {
  font: 19px var(--serif);
}
.settings-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin-top: 7px;
  max-width: 270px;
}
.settings-row .error-text {
  color: var(--red);
}
.settings-row .error-text:empty {
  display: none;
}
.restore-compare {
  margin: 18px 0 6px;
}
.restore-compare td {
  padding: 9px 12px;
  font: 16px var(--serif);
}
.restore-compare tbody th {
  padding: 9px 12px 9px 0;
}
#picker {
  position: fixed;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: min(360px, calc(100dvh - 24px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  background: var(--surface);
  z-index: 1000;
  padding: 8px;
}
#modal #picker,
#modal #preview {
  position: absolute;
}
.picker-label {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--muted);
  padding: 9px 10px;
}
.picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px;
  width: 100%;
  font: 14px var(--serif);
  border-radius: 3px;
}
.picker-item:hover,
.picker-item:focus-visible {
  background: var(--sage-soft);
}
.picker-item small {
  font: 8px var(--sans);
  color: var(--muted);
}
#preview {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  width: 370px;
  max-width: calc(100vw - 20px);
  max-height: 390px;
  overflow: auto;
  z-index: 90;
  border-radius: 6px;
  padding: 16px 20px;
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--red);
  font: 18px var(--serif);
}
.preview-verses {
  max-height: 210px;
  overflow: auto;
  padding-right: 4px;
}
.preview-verses p {
  font: 14px/1.8 var(--serif);
  margin: 8px 0;
}
.preview-verses sup {
  font: 8px var(--sans);
  color: var(--red);
}
.preview-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}
.preview-footer .icon {
  width: 17px;
}
#preview .net-credit {
  font-size: 7px;
  text-align: left;
  margin-bottom: 0;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 15px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 21px;
  border-radius: 5px;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 1001;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.save-error {
  background: var(--red-soft);
  border-bottom: 1px solid var(--red);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.save-error > span {
  max-width: 650px;
}
.save-error form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.save-error input {
  width: 190px;
  padding: 6px 9px;
}
.scrim {
  display: none;
}
.loading {
  min-height: 70vh;
  display: grid;
  place-content: center;
  font: italic 21px var(--serif);
  gap: 20px;
  color: var(--muted);
}
.login-page {
  min-height: 100dvh;
  padding: 50px 8vw;
  background: radial-gradient(
    ellipse at 14% 65%,
    var(--sage-soft),
    transparent 60%
  );
}
.login-brand {
  font: 43px var(--serif);
  letter-spacing: -2px;
  color: var(--red);
}
.login-brand span {
  margin-top: 11px;
  font-size: 8px;
  letter-spacing: 3px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 10vw;
  max-width: 1100px;
  margin: 80px auto 50px;
}
.login-intro h1 {
  font-size: 63px;
  line-height: 1.15;
  margin: 24px 0;
}
.login-intro h1 em {
  color: var(--sage);
}
.login-intro p {
  font: 18px/1.7 var(--serif);
  color: var(--muted);
  max-width: 360px;
}
.book-ornament {
  font-size: 45px;
  color: var(--sage);
  margin-top: 34px;
}
.login-card {
  padding: 35px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.login-card h2 {
  font-size: 30px;
  margin: 16px 0;
}
.login-card > p {
  font: 14px/1.7 var(--serif);
  color: var(--muted);
}
.login-card > label {
  margin-top: 21px;
  font-size: 11px;
}
.login-card > .button {
  width: 100%;
  margin-top: 24px;
}
.login-card > .help {
  font: 10px var(--sans);
  margin-top: 8px;
}
.login-card > .error-text {
  font: 12px var(--sans);
  color: var(--red);
  margin-top: 12px;
}
.login-card details {
  font-size: 10px;
  color: var(--muted);
  margin-top: 15px;
}
.login-card details summary {
  cursor: pointer;
}
.private-note {
  font-size: 9px;
  color: var(--muted);
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.private-note .icon {
  width: 13px;
  height: 13px;
}
.login-page > footer {
  font: italic 13px var(--serif);
  color: var(--muted);
  text-align: center;
  margin-top: 50px;
}
@media (min-width: 1500px) {
  .page-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .reader-grid {
    gap: 46px;
  }
  .reader-title {
    padding-bottom: 45px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 210px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .workspace {
    margin-left: 210px;
  }
  #main {
    padding: 35px 32px 45px;
  }
  .topbar {
    padding: 0 30px;
  }
  .page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .document-layout {
    gap: 35px;
    grid-template-columns: minmax(0, 1fr) 145px;
  }
  .inventory-tools {
    flex-wrap: wrap;
  }
  .inventory-tools > .inline-search {
    width: 100%;
  }
  .reader-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 25px;
  }
  .left-margin {
    grid-column: 1/-1;
    order: 3;
    border-top: 1px solid var(--line);
    margin-top: 25px;
  }
  .left-margin .source-card {
    display: inline-block;
    width: 48%;
    vertical-align: top;
  }
  .reader-toolbar {
    gap: 10px;
    flex-wrap: wrap;
  }
  .reader-toolbar form {
    max-width: 170px;
  }
  .reader-actions {
    margin-left: auto;
  }
  .reader-actions .button {
    padding: 7px 9px;
  }
  .note-card {
    margin-top: 0 !important;
  }
  .notebook-stats {
    gap: 25px;
  }
  .overview-intro {
    padding: 27px;
  }
  .overview-collections {
    padding: 26px;
  }
  .favorites-tools {
    flex-wrap: wrap;
  }
  .favorites-tools > span {
    width: 100%;
    margin: 0;
  }
  .librarian-columns {
    gap: 25px;
  }
  .ask-panel {
    padding: 23px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 190px;
    padding: 30px 12px 0;
  }
  .brand {
    font-size: 30px;
  }
  .brand span {
    font-size: 6px;
  }
  .nav-item {
    gap: 9px;
    padding: 11px 9px;
    font-size: 11px;
  }
  .nav-count {
    display: none;
  }
  .workspace {
    margin-left: 190px;
  }
  .topbar {
    height: 65px;
    padding: 0 25px;
  }
  .search-button span,
  .search-button kbd {
    display: none;
  }
  .top-actions {
    gap: 10px;
  }
  #main {
    padding: 30px 25px 40px;
  }
  h1 {
    font-size: 39px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading p {
    font-size: 14px;
  }
  .page-heading > .button {
    font-size: 10px;
    padding: 10px 12px;
  }
  .page-heading > .button .icon {
    width: 14px;
  }
  .web-overview {
    grid-template-columns: 1fr;
  }
  .overview-intro {
    padding: 25px;
    position: relative;
  }
  .overview-intro h2 {
    font-size: 28px;
  }
  .overview-intro > p {
    max-width: 220px;
  }
  .notebook-stats {
    position: static;
    flex-direction: row;
    gap: 17px 25px;
  }
  .notebook-stats > div {
    flex-direction: row;
    align-items: baseline;
    gap: 9px;
  }
  .notebook-stats strong {
    font-size: 23px;
  }
  .overview-collections {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 25px;
  }
  .collection-row {
    padding: 13px 0;
  }
  .collection-row strong {
    font-size: 18px;
  }
  .page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .first-page {
    padding: 17px;
  }
  .first-page small {
    font-size: 10px;
    line-height: 1.6;
  }
  .document-layout {
    display: block;
  }
  .document-margin {
    display: none;
  }
  .document-margin:has(.passage-index) {
    display: block;
    position: static;
    margin-top: 32px;
  }
  .document-margin > :not(.passage-index) {
    display: none;
  }
  .page-title {
    font-size: 42px;
  }
  .workspace-footer {
    padding: 18px 25px;
    font-size: 8px;
  }
  .workspace-footer > span:first-child {
    max-width: 160px;
    line-height: 1.7;
  }
  .coverage-grid {
    grid-template-columns: 1fr;
  }
  .coverage-tools {
    align-items: flex-start;
    flex-direction: column;
  }
  .coverage-summary {
    gap: 25px;
    padding: 24px;
  }
  .coverage-summary > .coverage-note {
    display: none;
  }
  .librarian-columns {
    grid-template-columns: 1fr;
  }
  .related-panel #related-results {
    grid-template-columns: 1fr;
  }
  .reader-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .right-margin {
    order: 2;
    border-top: 1px solid var(--line);
    margin-top: 18px;
  }
  .aligned-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .blank-margin {
    grid-column: 1/-1;
    max-width: 400px;
    border: 0;
    padding: 10px 0;
  }
  .blank-margin h3 br {
    display: none;
  }
  .blank-margin h3 {
    font-size: 20px;
  }
  .blank-margin p {
    font-size: 14px;
  }
  .note-marker {
    display: inline-block;
    position: absolute;
    right: -14px;
    top: 13px;
    border: 1px solid var(--red-soft);
    background: var(--red-soft);
    color: var(--red);
    font: 8px var(--sans);
    border-radius: 8px;
    padding: 3px 5px;
    min-width: 17px;
  }
  .scripture {
    max-width: 600px;
    margin: auto;
    width: 100%;
    padding: 0 12px 10px 0;
  }
  .reader-title h1 {
    font-size: 48px;
  }
  .reader-toolbar form {
    order: 3;
    max-width: none;
    width: 100%;
    margin: 0;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .reader-toolbar {
    padding-bottom: 8px;
  }
  .reader-toolbar form input {
    padding-left: 8px;
  }
  .selection-bar {
    flex-wrap: wrap;
  }
  .selection-bar > span {
    width: 100%;
    text-align: center;
  }
  .login-layout {
    gap: 6vw;
    grid-template-columns: 1fr 360px;
    margin-top: 60px;
  }
  .login-intro h1 {
    font-size: 48px;
  }
  .login-card {
    padding: 28px;
  }
  .login-page {
    padding: 35px 5vw;
  }
  .login-intro p {
    font-size: 16px;
  }
}
@media (max-width: 650px) {
  .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s;
    width: 245px;
    padding: 30px 21px 0;
  }
  .brand {
    font-size: 36px;
  }
  .brand span {
    font-size: 8px;
  }
  .nav-item {
    font-size: 13px;
    padding: 13px 12px;
  }
  .workspace {
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    padding: 0 16px;
    gap: 9px;
    height: 60px;
  }
  .breadcrumb {
    margin-right: auto;
    font-size: 10px;
  }
  .breadcrumb span {
    margin: 0 7px;
  }
  .top-actions {
    gap: 4px;
  }
  .menu-open .sidebar {
    visibility: visible;
    transform: translateX(0);
  }
  .menu-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: #17201766;
    z-index: 19;
  }
  .sidebar-collections a {
    font-size: 12px;
  }
  .profile > span:nth-child(2) {
    font-size: 12px;
  }
  #main {
    padding: 30px 21px 40px;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 25px;
  }
  .page-heading h1 {
    font-size: 38px;
    letter-spacing: -1px;
    margin-top: 12px;
  }
  .page-heading p {
    font-size: 14px;
  }
  .page-heading > .button {
    font-size: 11px;
    padding: 10px 13px;
  }
  .web-overview {
    margin-bottom: 30px;
  }
  .overview-intro {
    padding: 24px;
  }
  .overview-intro h2 {
    font-size: 29px;
  }
  .overview-intro > p {
    max-width: 190px;
    font-size: 10px;
  }
  .notebook-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .notebook-stats > div {
    flex-direction: column;
    gap: 3px;
  }
  .notebook-stats strong {
    font-size: 25px;
  }
  .notebook-stats span {
    font-size: 8px;
  }
  .section-top h2 {
    font-size: 24px;
  }
  .section-top .inline-search {
    max-width: 150px;
  }
  .inline-search input {
    font-size: 11px;
  }
  .filter-row {
    gap: 4px;
  }
  .filter {
    font-size: 9px;
    padding: 6px 8px;
  }
  .page-grid {
    gap: 9px;
  }
  .page-card {
    padding: 15px 14px;
    min-height: 110px;
  }
  .page-card h3 {
    font-size: 20px;
  }
  .first-page {
    padding: 18px 14px;
    gap: 12px;
  }
  .first-page strong {
    font-size: 17px;
  }
  .first-page > .icon {
    display: none;
  }
  .dashed-icon {
    padding: 8px;
  }
  .first-page small {
    font-size: 10px;
  }
  .workspace-footer {
    padding: 17px 21px;
  }
  .document-top {
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 14px;
  }
  .document-actions {
    gap: 7px;
  }
  .document-actions .button {
    font-size: 10px;
  }
  .page-title {
    font-size: 43px;
    margin-bottom: 23px;
  }
  .page-fields {
    gap: 14px;
  }
  .page-fields label {
    font-size: 9px;
  }
  .page-fields input {
    font-size: 11px;
  }
  .writing-section h2 {
    font-size: 24px;
  }
  .writing-section {
    padding: 23px 0;
  }
  .writing-heading {
    margin-bottom: 12px;
  }
  .editable-content {
    font-size: 17px;
    min-height: 65px;
  }
  .inline-editor {
    font-size: 17px;
  }
  .editor-footer {
    font-size: 9px;
  }
  .editor-footer i {
    margin: 0 3px;
  }
  .editor-footer kbd {
    font-size: 9px;
  }
  .library-summary {
    padding: 20px;
  }
  .library-note {
    display: none;
  }
  .inventory-tools {
    gap: 11px;
  }
  .filter-select {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .filter-select select {
    max-width: 115px;
    font-size: 10px;
  }
  .favorites-tools {
    gap: 15px;
  }
  .favorites-tools > label {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .favorites-tools select {
    width: 140px;
  }
  .favorite-card {
    gap: 14px;
  }
  .favorite-card h3 {
    font-size: 23px;
  }
  .coverage-summary {
    gap: 40px;
    padding: 22px;
  }
  .coverage-summary strong {
    font-size: 32px;
  }
  .coverage-summary strong small {
    font-size: 15px;
  }
  .coverage-tools .filter-row {
    gap: 2px;
  }
  .coverage-grid {
    gap: 24px;
  }
  .chapter-cell {
    width: 25px;
    height: 25px;
    font-size: 9px !important;
  }
  .legend {
    font-size: 9px;
  }
  .librarian-notice {
    font-size: 10px;
    line-height: 1.7;
  }
  .ask-panel h2 {
    font-size: 32px;
  }
  #main.reader-main {
    padding: 16px 20px 30px;
  }
  .reader-location {
    gap: 3px;
  }
  .reader-location select {
    padding: 6px 3px;
    font-size: 12px;
  }
  .reader-location #reader-book {
    max-width: 120px;
  }
  .reader-actions {
    gap: 4px;
  }
  .reader-actions .button {
    font-size: 9px;
    padding: 7px;
  }
  .reader-actions .icon {
    width: 12px;
    height: 12px;
  }
  .reader-actions .button:last-child {
    font-size: 0;
    gap: 0;
    padding: 7px;
  }
  .reader-actions .button:last-child .icon {
    width: 16px;
    height: 16px;
  }
  .reader-title {
    padding: 30px 0;
  }
  .reader-title h1 {
    font-size: 47px;
  }
  .reader-title .eyebrow {
    font-size: 8px;
  }
  .scripture {
    font-size: 19px;
    line-height: 1.9;
    padding-right: 9px;
  }
  .verse {
    padding: 7px 3px 7px 19px;
  }
  .chapter-initial {
    font-size: 66px;
    margin-left: 18px;
  }
  .chapter-navigation {
    gap: 8px;
    flex-wrap: wrap;
  }
  .chapter-navigation .text-button {
    font-size: 10px;
  }
  .chapter-navigation > a {
    font-size: 10px;
  }
  .chapter-navigation > a .icon {
    display: none;
  }
  .aligned-notes {
    display: block;
  }
  .note-card .prose {
    font-size: 16px;
  }
  .left-margin .source-card {
    display: block;
    width: 100%;
  }
  .selection-bar {
    gap: 6px;
  }
  .selection-bar > span {
    font-size: 12px;
  }
  .selection-bar .small-button {
    font-size: 10px;
  }
  .selection-bar .icon-button {
    width: 27px;
    height: 27px;
  }
  .net-credit {
    font-size: 8px;
  }
  #modal {
    padding: 22px;
    max-height: 92dvh;
    border-radius: 8px;
  }
  .modal-header h2 {
    font-size: 25px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .modal-footer {
    gap: 12px;
  }
  #modal input,
  #modal textarea,
  #modal select {
    font-size: 16px;
  }
  .settings-row {
    gap: 15px;
  }
  .settings-row strong {
    font-size: 18px;
  }
  .settings-row .button {
    font-size: 10px;
    padding: 9px;
  }
  .settings-row .icon {
    display: none;
  }
  .save-error {
    flex-wrap: wrap;
    padding: 11px;
    font-size: 10px;
    gap: 6px;
  }
  .save-error > span {
    width: 100%;
  }
  .save-error .small-button {
    font-size: 9px;
  }
  .login-page {
    padding: 30px 24px;
  }
  .login-brand {
    font-size: 37px;
  }
  .login-brand span {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .login-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
    max-width: 450px;
  }
  .login-intro .eyebrow {
    font-size: 9px;
  }
  .login-intro h1 {
    font-size: 45px;
    margin: 17px 0;
    line-height: 1.1;
  }
  .login-intro p {
    font-size: 15px;
  }
  .book-ornament {
    display: none;
  }
  .login-card {
    padding: 27px;
  }
  .login-card h2 {
    font-size: 28px;
  }
  .login-card input {
    font-size: 16px;
  }
  .login-page > footer {
    margin-top: 25px;
  }
  .empty-state {
    padding: 40px 12px;
  }
  .empty-state h3 {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.picker-create-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.picker-create-section select {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 9px;
  font-size: 13px;
}
.picker-create-section > button {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 12px;
}
.anchor-warning {
  font: 10px/1.6 var(--sans);
  color: var(--red);
  margin: 9px 0;
}
@media (max-width: 650px) {
  #modal:has(.note-card) {
    margin-bottom: 0;
    max-width: 100%;
    width: 100%;
    border-radius: 14px 14px 0 0;
  }
}

.citation,
.wiki-link,
.passage-ref {
  display: inline-block;
  max-width: 100%;
}

/* Collection creation and membership use the same book picker. */
.collection-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.collection-nav-heading .nav-label {
  margin-bottom: 0;
}
.collection-nav-links {
  max-height: 22vh;
  overflow-y: auto;
}
.collection-create {
  margin-top: 16px;
}
.collection-members-field {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.collection-members-field > span {
  color: var(--muted);
  font-size: 11px;
}
.collection-members-field > strong {
  font-size: 12px;
  font-weight: 500;
}
.collection-book-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-height: 310px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.collection-book-groups fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.collection-book-groups legend {
  color: var(--red);
  font: 18px var(--serif);
  margin-bottom: 12px;
}
#modal label.collection-book-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  font-size: 12px;
}
#modal .collection-book-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  accent-color: var(--red);
  flex: 0 0 auto;
}
@media (max-width: 650px) {
  .collection-book-groups {
    grid-template-columns: 1fr;
    max-height: 38dvh;
  }
}

.verse.notes-active {
  background: var(--sage-soft);
}
#reader-note-popover {
  position: fixed;
  z-index: 6;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.verse-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: var(--red);
  font-family: var(--serif);
  border-bottom: 1px solid var(--line);
}
.verse-note-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}
.verse-note-body .note-card:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}
.verse-note-body blockquote {
  max-height: 72px;
  overflow-y: auto;
}

.pinned-list {
  display: grid;
  gap: 28px;
  max-width: 900px;
}
.pinned-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  min-width: 0;
}
.pinned-heading,
.pinned-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pinned-heading h2 {
  margin: 0;
  font: 26px var(--serif);
}
.pinned-scripture {
  max-height: 360px;
  overflow-y: auto;
  font: 18px/1.8 var(--serif);
  margin-top: 18px;
}
.pinned-scripture p {
  margin: 0 0 10px;
}
.pinned-scripture sup {
  color: var(--muted);
  font: 10px var(--sans);
}
.pinned-actions {
  justify-content: flex-start;
  margin: 20px 0;
}
.pinned-commentary .note-card {
  margin-top: 18px;
}
@media (max-width: 600px) {
  .pinned-card {
    padding: 16px;
  }
  .pinned-heading h2 {
    font-size: 23px;
  }
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.entry-grip {
  cursor: grab;
  touch-action: none;
  color: var(--ink);
  padding: 7px 9px;
  min-height: 36px;
  white-space: nowrap;
}
.entry-grip .icon {
  width: 16px;
  height: 16px;
}
.entry-move-controls:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.reordering-card,
.reordering-card * {
  cursor: grabbing !important;
  user-select: none;
}
.card-dragging {
  opacity: 0.45;
}
.card-drop-before {
  box-shadow: 0 -3px 0 var(--sage);
}
.card-drop-after {
  box-shadow: 0 3px 0 var(--sage);
}

/* Demo mode: a public showcase with example notes. */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  padding: 9px 16px;
  background: #7d3a30;
  color: #fffaf3;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}
.demo-banner a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.demo-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  text-align: left;
}
.demo-card small {
  color: var(--muted);
  line-height: 1.45;
}
.demo-card a {
  color: var(--red);
  font-weight: 600;
}
@media (max-width: 700px) {
  .demo-banner {
    position: static;
    font-size: 13px;
  }
}
