/* Carpocrates reader extension.
   Keeps the book's warm amber palette while using the shared reader shell. */

:root {
  --c-bg: #30261d;
  --c-text: #f0dbc2;
  --c-text-soft: #cdb797;
  --c-link: #d8a55c;
  --c-link-hover: #ffdd99;
  --c-border: #a77f4f;
  --c-border-strong: #8b6b3a;
  --c-bg-offset: rgba(40, 30, 20, 0.4);
  --c-button-bg: #a77f4f;
  --c-button-text: #1c1b18;
  --c-menu-border: var(--c-bg);
  --c-menu-outline: var(--c-text);
  --c-stats-bg: linear-gradient(#3a2e22, #2e2318);
  --c-stats-border: #a77f4f;
  --c-stats-shadow: inset 0 0 0 2px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.12);
  --c-stats-text: #f0dbc2;
  --c-stats-divider: rgba(167,127,79,.4);
  --c-sightline: rgba(167,127,79,.12);
  --c-exit: #7AFFBD;
  --c-exit-hover: #9AFFCD;
}

:root[data-theme="light"] {
  --c-bg: #fbf9f3;
  --c-text: #2c2a2e;
  --c-text-soft: #6d6a70;
  --c-link: #3a5c8d;
  --c-link-hover: #1e3250;
  --c-border: #e0dce5;
  --c-border-strong: #bfbac9;
  --c-bg-offset: #f2f0f5;
  --c-button-bg: var(--c-link);
  --c-button-text: var(--c-bg);
  --c-menu-border: var(--c-bg);
  --c-stats-bg: linear-gradient(#f0f2f6, #e9ebf2);
  --c-stats-border: #1b1b1b;
  --c-stats-shadow: inset 0 0 0 2px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.12);
  --c-stats-text: #111;
  --c-stats-divider: rgba(0,0,0,.12);
  --c-sightline: rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --c-bg: #241c14;
    --c-text: #f0dbc2;
    --c-text-soft: #bfa37b;
    --c-link: #d8a55c;
    --c-link-hover: #ffdd99;
    --c-border: #8b6b3a;
    --c-border-strong: #6e5430;
    --c-bg-offset: rgba(30, 22, 14, 0.6);
    --c-button-bg: #8b6b3a;
    --c-button-text: #f0dbc2;
    --c-menu-border: #30261d;
    --c-stats-bg: linear-gradient(#1a1209, #150e06);
    --c-stats-border: #a77f4f;
    --c-stats-shadow: inset 0 0 0 2px rgba(167,127,79,.15), 0 6px 18px rgba(0,0,0,.3);
    --c-stats-text: #f0dbc2;
    --c-stats-divider: rgba(167,127,79,.3);
    --c-sightline: rgba(167,127,79,.18);
  }
}

:root[data-theme="dark"] {
  --c-bg: #241c14;
  --c-text: #f0dbc2;
  --c-text-soft: #bfa37b;
  --c-link: #d8a55c;
  --c-link-hover: #ffdd99;
  --c-border: #8b6b3a;
  --c-border-strong: #6e5430;
  --c-bg-offset: rgba(30, 22, 14, 0.6);
  --c-button-bg: #8b6b3a;
  --c-button-text: #f0dbc2;
  --c-menu-border: #30261d;
  --c-stats-bg: linear-gradient(#1a1209, #150e06);
  --c-stats-border: #a77f4f;
  --c-stats-shadow: inset 0 0 0 2px rgba(167,127,79,.15), 0 6px 18px rgba(0,0,0,.3);
  --c-stats-text: #f0dbc2;
  --c-stats-divider: rgba(167,127,79,.3);
  --c-sightline: rgba(167,127,79,.18);
}

#titlepage .subtitle a {
  text-decoration: none;
}

#titlepage figure picture {
  width: 66%;
}

#titlepage figure img {
  height: auto;
}

.abstract {
  margin: 0 0.5in 12pt 0.5in;
  text-align: justify;
  font-style: italic;
}

.lang-nav {
  margin: 0.75rem 0;
  font-size: 0.9em;
  text-align: center;
}

.lang-nav a {
  text-decoration: none;
}

.lang-nav a:hover,
.lang-nav a:focus {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .abstract {
    margin-left: 0.25in;
    margin-right: 0.25in;
  }
}
