@font-face {
  font-family: 'Charter';
  src: local('Charter Roman'), local('Charter'),
       url('/incldues/fonts/Charter-Roman.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Charter';
  src: local('Charter Italic'),
       url('/incldues/fonts/Charter-Italic.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Charter';
  src: local('Charter Bold'), local('Charter-Bold'),
       url('/incldues/fonts/Charter-Bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Charter';
  src: local('Charter Bold Italic'), local('Charter-BoldItalic'),
       url('/incldues/fonts/Charter-BoldItalic.woff2') format('woff2');
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

/* Base */

body {
  margin: 0;
  font-family: Charter, serif;
  font-size: 18px;
  background: #fff;
}

/* Main content area */

main {
  max-width: 650px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem 1rem 1rem;
  box-sizing: border-box;
}

/* Headings */

h1, h2, h3, h4 {
  font-size: 1em;
  line-height: 1rem;
  margin-bottom: 1rem;
}

/* Links */

a {
  color: #000;
}
a:not(.internal-link):not(.recent-updates a) {
  text-decoration: underline;
  text-decoration-color: #000;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  text-decoration-color: #d86c5f;
  text-decoration-color: #CCAA55;
}
a:hover {
    background-color: #eee;
  }

a:visited {
  color: inherit;
}

a.internal-link {
  text-decoration: underline;
  text-decoration-color: #000;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  text-decoration-color: currentColor;
}


a.internal-link.missing-link {
  color: #d86c5f;
}

.recent-updates a {
  text-decoration: underline;
}

li:not(:last-child) {
  margin-bottom: .5em;
}



/* Entry boxes */

.entry {
  border: 1px solid #000;
  margin-bottom: 2rem;
  color: #111;
  background: #F9F9F9;        /* card body color stays #f9f9f9 */
  overflow-wrap: break-word;
  word-break: break-word;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  background: #fff;           /* header of card is white */
  padding: 1rem;
  border-bottom: 1px solid #000;
}

.entry-location.unpublished {
  background-color: #ccff00;  /* fluorescent yellow-green */
  color: #000;
  padding: 0 0.25em;
  border-radius: 2px;
}

.entry-location {
  font-weight: 600;
}

.entry-header:hover .entry-date a {
  text-decoration: underline;
}

.entry-body {
  padding: 0rem 1rem;
  line-height: 1.7;
}

.entry-body ul {
  padding-left: 1em;
}

.entry-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0 1.25rem 0;
  border-radius: 4px;
}

.entry-body hr {
  margin-bottom: 1.3rem;  
}

.entry-body p {
  margin: 1rem 0;
  line-height: 1.5;
}

.entry-date a {
  color: #111;
  text-decoration: none;
}

.entry-date a:hover {
  text-decoration: underline;
}

/* Filters, selects, buttons */

.filter-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.1rem 1rem 0.1rem 0.2rem;
  font-size: 0.9rem;
  border: 1px solid #333;
  border-radius: 4px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6H0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.2rem center;
  background-size: 0.65rem;
  color: inherit;
  cursor: pointer;
}

select:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.reset-button {
  font-family: sans-serif;
  padding: 0.3rem 0.4rem;
  font-size: 0.9rem;
  background: #222;
  border: 1px solid #333;
  border-radius: 4px;
  color: #eee;
  text-decoration: none;
  cursor: pointer;
}

/* Audio */

.audio-player-container {
  display: flex;
  align-items: center;
  margin: 1em 0;
}

audio {
  flex-grow: 1;
}

/* Backlinks */

.backlinks {
  margin-top: 2rem;
  padding: 0 .2rem;
}

.backlink {
  margin: 3rem 0;
}

.backlink a {
  color: #fff;  
}

.backlink-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: .6rem;
}

.backlink-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.backlink-text {
  position: absolute;
  bottom: 5px;
  left: 5px;
  padding: 0.5rem 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 3px;
  display: inline-block;
  max-width: 95%;
  box-sizing: border-box;
}

.backlink-text span {
  color: white;
  border-radius: 2px;
  display: inline-block;
}

/* Star toggle */

.star-toggle {
  font-family: system-ui;
  cursor: pointer;
  transition: color 0.3s;
  user-select: none;
}

/* Responsive tweaks */

@media (max-width: 500px) {
  body {
    font-size: 16px;
  }
  main {
    padding: 1.5rem 0.75rem;
  }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  padding: 0 .5rem;
}

#logo {
  display: inline-block;
  width: .8em;             /* scales with font size */
  height: .8em;
  border-radius: 50%;      /* makes it circular */
  border: 2px solid currentColor;  /* outline */
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
  color: currentColor;     /* inherits text color */
  text-decoration: none;
  vertical-align: middle;
}

#logo:hover {
  background: currentColor; 
  color: black;
}

.starred-pages {
  display: flex;
  flex-direction: row-reverse; /* newest on visual right-to-left */
  align-items: center;
  overflow: hidden;            /* hide overflowed links */
  white-space: nowrap;
  flex: 1;
  min-height: 2em;
  max-width: 94%;
}

.starred-pages a {
  flex-shrink: 0;              /* links don’t shrink, just overflow */
  color: inherit;
  text-decoration: none;
}

.starred-pages a:hover {
  text-decoration: underline;
}

footer {
  padding: 0 .3rem;
}