/*  Inter body font */
@font-face {
    font-family: "Inter";
    src: url("../../font/inter-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../../font/inter-var-i.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/*  Source serif 4 heading font */

@font-face {
    font-family: "SourceSerif4";
    src: url("../../font/SourceSerif4-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SourceSerif4";
    src: url("../../font/SourceSerif4-var-i.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

body {
    font-family: "Inter", Arial, sans-serif;
    font-size: 1em;
    color: #111;
}

p {
    text-indent: 1.3rem;
    margin: 0.3rem 0;
    text-align: justify;
}

h1 {
    font-family: "SourceSerif4", "Times New Roman", serif;
}

#reader-head {
    text-align: center;
    max-width: 95%;
    margin: auto;
    padding-bottom: 0.5rem;
}

.content-box {
    width: 98%;
    max-width: 60ch;
    padding-bottom: 1rem;
    margin: auto;
    line-height: 1.5;
}

.chapter-nav {
    width: 80%;
    justify-content: space-between;
    margin: auto;
    display: flex;
    flex-direction: row;
    max-width: 60ch;
}

.chapter-nav a {
  white-space: nowrap;
  padding-bottom: 1rem;
}

.lead-in-caps {
    font-variant-caps: small-caps;
    font-size: 1.5rem;
}

.quote {
    max-width: 75%;
    text-align: center;
    margin: auto;
    padding-bottom: 0.5rem;
    font-style: italic;
}

.page-num + p {
    margin-top: 0;
}

.page-num {
    font-variant-caps: small-caps;
    text-align: right;
    font-size: small;
    margin: 0;
}

/* possible way to call page number element auto

p[data-page] {
  position: relative;
}

p[data-page]::before {
  content: attr(data-page);
  position: absolute;
  transform: translateX(150%);
  font-size: 0.75em;
  opacity: 0.6;
}*/

#dark-mode-toggle {
    background-color: #222;
    color: #eee;
    padding: 0.3rem;
}

body.dark {
    background-color: #222;
    color: #eee;
}

body.dark #reader-head {
    color: #fff;
}

body.dark .chapter-nav a {
    color: #eee;
}

body.dark .content-box {
    background-color: #222; /* optional */
}

body.dark #dark-mode-toggle {
    background-color: #eee;
    color: #111;
    padding: 0.3rem;
}

body.dark .nb {
    background-color: #333;
    border-left-color: #555;
    color: #ddd;
}

body.dark .nb summary {
    color: #fff;
}

/*  nb refers admin (me) notes for purposes of clarity/ formatting */

.nb {
    border-left: 2px solid #999;
    padding: 0.5rem 0.5rem;
    margin: 1rem 1rem;
    background-color: #f9f9f9;
    font-size: 0.8rem;
}

.nb summary {
    cursor: pointer;
    font-weight: bold;
    /*list-style: none;*/
}

.nb summary::marker {
    /*content: '▸'; */
    font-size: 0.7rem;
    margin-right: 0.5rem;
}

/*.nb[open] summary::marker {
    content: '▾';
}*/

body.dark .note {
    background-color: #333;
    border-left-color: #555;
    color: #ddd;
}

body.dark .note summary {
    color: #fff;
}

/*  note refers to the expandable tool tips */

.note {
    border-left: 2px solid #999;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background-color: #f9f9f9;
    font-size: 0.95rem;
}

.note summary {
    cursor: pointer;
    font-weight: bold;
   /* list-style: none; */
}

.note summary::marker {
    /*content: '▸'; */
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/*.note[open] summary::marker {
    content: '▾';
}*/

.chapter-toc {
    border-left: 2px solid #87b6c9;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background-color: #b9ebff;
}

.chapter-toc summary {
    cursor: pointer;
    font-weight: bold;
    /*list-style:none; */
}

.chapter-toc summary::marker {
    /*content: '▸'; */
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/*.chapter-toc[open] summary::marker {
    content: '▾';
}*/

body.dark .chapter-toc {
    background-color: #244653;
    border-left-color: #112933;
}

/*  This original and plain tags are for the table text comparisons */

.original {
    font-style: italic;
}

/* dividing line between the two columns */
.text_comp td:first-child {
    border-right: 0.5px solid #999;
    padding-right: 0.25rem;      /* extra space so text isn't against the line */
}

body.dark .text_comp td:first-child {
    border-right-color: #555;
}

.inventory_table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.inventory_table th,
.inventory_table td {
    padding: 0.25rem 0.5rem;
    vertical-align: top;
}

/* vertical internal borders */
.inventory_table th:not(:last-child),
.inventory_table td:not(:last-child) {
    border-right: 1px solid #999;
}

/* horizontal internal borders */
.inventory_table tr:not(:last-child) th,
.inventory_table tr:not(:last-child) td {
    border-bottom: 1px solid #999;
}

/* dark mode */
body.dark-mode .inventory_table th:not(:last-child),
body.dark-mode .inventory_table td:not(:last-child),
body.dark-mode .inventory_table tr:not(:last-child) th,
body.dark-mode .inventory_table tr:not(:last-child) td {
    border-color: #555;
}

body.dark a {
    color: #b9ebff;
}

/* APPENDIX STYLING */
.append-head {
    max-width: 95%;
}

/*.numeral {
    font-family: Courier, monospace;
}*/

/*:target {
  animation: target-glow 3s ease-out;
}

@keyframes target-glow {
  0% {
    box-shadow: 0 0 1rem rgba(255, 200, 0, 0.7);
  }
  100% {
    box-shadow: none;
  }
}*/

:root {
  --target-glow-color: rgba(255, 0, 0, 0.9);
}

.dark {
  --target-glow-color: rgba(201, 201, 201, 0.9);
}

:target {
  animation: target-glow 4s ease-out;
}

@keyframes target-glow {
  0% { box-shadow: 0 0 1rem var(--target-glow-color); }
  100% { box-shadow: none; }
}

@media (orientation: landscape) {
    .content-box {
        max-width: 80ch; /* wider lines for landscape */
    }
}

/*@media screen and (max-width: 720px) {

}*/

/*@media (prefers-color-scheme: dark) {
    body {
        background-color: #111;
        color: #eee;
    }

    #reader-head {
        color: #fff;
    }

    .content-box {
        background-color: #111; 
    }

    .chapter-nav a {
        color: #eee;
    }
}*/