:root {
  --form-control-disabled: #959495;
}

body.had {
  background-image: none;
}

.had #wrapper {
  max-width: 100%;
}

.had #inner-wrapper {
  border: none;
}

.had #left-column, .had #right-column {
  width: 100%;
  border: none;
}

.had h1 {
  padding: 0 20px;
}

.had h1 span {
  display: block;
  font-weight: normal;
  font-size: 80%;
}

.had #right-column h1 {
  border: 0;
}

.had .right-column-sub-nav {
  border: 0;
  margin: 0 20px;
  text-align: center;
}

.had .right-column-sub-nav li a {
  padding-left: 0;
  padding-right: 0;
}

.had #logo-main {
  position: relative;
  padding-top: 32px;
  /* padding-top: 80px; */
}

.had #logo-main img {
  max-width: 80%;
  height: auto;
}

.had .feature-story, .had .content-page, .had #archives {
  width: 100%;
  height: auto;
  background-color: transparent;
  border: 0;
  text-align: center;
}

.had #left-column {
  margin-top: 48px;
}

.had .title-block-large, .had .page-title, .had #archives-results {
  bottom: auto;
  margin: -40px auto 40px;
  padding: 0;
}

.had .feature-image-large {
  margin-bottom: 40px;
}

.had .feature-image-large img {
  max-width: 100%;
}

.had #archives .page-title {
  color: transparent;
  cursor: default;
  pointer-events: none;
}

.share-meow {
  width: 438px;
  height: auto;
  border: 1px solid #E1E8ED;
}

.had #archives-results {
  text-align: center;
}

.had .story-content, .had .page-content, .had #archives-results {
  float: none;
  max-width: 550px;
  margin: auto;
  text-align: justify;
  clear: both;
}

.had .story-content {
  font-size: 1.6em;
}

p.hanging-indent {
  text-align: left;
}

.had .story-content li, .had .story-content p {
  font-size: 100%;
}

.had .story-content h1 {
  font-size: 1.8em;
}

.had .story-content h2 {
  font-size: 1.2em;
}

.had .story-content img {
  max-width: 100%;
}

.had .story-author-bio {
  float: none;
  width: 100%;
  max-width: 550px;
  margin: 0 auto 20px auto;
  border: 0;
  padding-top: 0;
}

.had .story-content {
  padding-bottom: 32px;
}

.had .story-author-bio-inner p {
  padding-top: 20px;
}

.had .story-author-bio-inner p:last-of-type {
  padding-bottom: 20px;
}

.had .book-sharing {
  float: none;
  max-width: 550px;
  margin: auto;
  text-align: center;
}

.had #more-stories {
  border: 0;
}

.had #features-sub-nav {
  max-width: 550px;
  margin: auto;
  padding-top: 40px;
}

.had .title-block-large {
  position: relative;
  width: 100%;
  background: none;
  max-width: 550px;
  text-align: center;
  padding: 15px 0;
}

.had-sep, .had-sep-1, .had-sep-2, .had-sep-3, .had-sep-4, .had-sep-5, .had-sep-6, .had-sep-7, .had-sep-8 {
  display: block;
  height: 20px;
  width: 20px;
  background-size: contain;
  background-position: 50% 50%;
  overflow: hidden;
  text-indent: 100px;
  margin: auto !important;
  text-align: center;
}

.had-sep.left, .had-sep-1.left, .had-sep-2.left, .had-sep-3.left, .had-sep-4.left, .had-sep-5.left, .had-sep-6.left, .had-sep-7.left, .had-sep-8.left {
  margin: 20px !important;
}

.had-sep-1, .had-sep-5 {
  background-image: url(/assets/had/sep1-d37741e58b90a9d0d485aaf3e8886b80244912b0a4a0b4f11666395f3b27bc54.png);
}

.had-sep-2, .had-sep-6 {
  background-image: url(/assets/had/sep2-e8dd27950c19aafa3fb9f11044d199ce0abce549c95b41ae26a945ab556d135b.png);
}

.had-sep-3, .had-sep-7 {
  background-image: url(/assets/had/sep3-1630e776ba4a1c6e4c9602f7d1b1eaa78dcd00d48cb6080bbd0f8061079eeac7.png);
}

.had-sep-4, .had-sep-8 {
  background-image: url(/assets/had/sep3-1630e776ba4a1c6e4c9602f7d1b1eaa78dcd00d48cb6080bbd0f8061079eeac7.png);
  transform: scaleX(-1);
}

.had-sep-5, .had-sep-6, .had-sep-7, .had-sep-8 {
  transform: scaleX(-1);
}

.had #footer {
  padding-top: 40px;
}

.social-icons > a {
  overflow: hidden;
  background-size: contain;
  background-repeat: no-repeat;
  width: 24px;
  height: 24px;
  text-indent: -10000px;
  color: transparent;
  display: inline-flex;
}

.social-icons > a:hover {
  opacity: 0.4;
}

.twitter-icon {
  background-image: url(/assets/had/twitter-3033ca079d53500c0b838b83c2c1d5a72045e6ca57bafc1ae5b3d7e3dc4a043b.svg);
}

.facebook-icon {
  background-image: url(/assets/had/facebook-b247f375c9924e5b0d6f6147807b077c1868eebecd0924dd24c1fe84593b97b8.svg);
}

.instagram-icon {
  background-image: url(/assets/had/instagram-bc26370f8c090c2d9bef629884a5aba4365aacf303a9351f70013dcc307fbad0.svg);
}

.bluesky-icon {
  background-image: url(/assets/had/bluesky-f3bb35f559bde9ac25e76d9b52f6064920eb4d4123601f7b44d16cf830696f5d.svg);
}

.had #pages-nav {
  text-align: center;
}

.had #pages-nav li {
  display: inline-block;
  float: none;
  border-color: #cdcdcd;
}

.had #pages-nav li:last-child {
  border: 0;
}

.tracks {
  padding: 2em 0 6em;
  position: relative;
}

.tracks img {
  width: 40%;
  height: auto;
  margin: 40px auto;
  display: block;
}

.had .pager {
  text-align: center;
}

.had .pagination {
  border: 0;
  display: inline-block;
  float: none;
  width: auto;
}

.had #archives .page,
.had #archives .next,
.had #archives .last,
.had #archives .prev,
.had #archives .first {
  border-right: 1px solid #cdcdcd;
}

.had #archives .first, .had #archives .page:first-child {
  border-left: 0;
}

.had #archives .last, .had #archives .page:last-child {
  border-right: 0;
}

.had .pagination .current {
  font-weight: bold;
}

.had #search {
  float: none;
  width: 265px;
  height: 44px;
  border: 0;
  margin: auto;
  padding-top: 1em;
}

.had #search input[type=text] {
  border-bottom: 1px solid #cdcdcd;
  border-radius: 0;
  height: 44px;
  width: 189px;
  padding: 0px;
  padding-left: 10px;
  font-family: "chaparral-pro", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-style: italic;
  font-size: 1.5em;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
}

.had #search input[type=submit], input[type=submit][value=Filter] {
  border: 0px;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
}

.had #search input[type=text]:focus {
  outline: none;
  border-color: #000;
}

.had #search-content {
  border-bottom: 0;
}

.had #search-results {
  padding: 40px 0;
  max-width: 550px;
  margin: auto;
  float: none;
}

.had #search-results .story {
  text-align: center;
  border-color: #dedede;
}

.had #search-results .story:first-child {
  border-top: 0;
}

.had .story-preview-content {
  margin: 0;
  width: 100%;
  padding: 20px 0;
}

.had h2.no-results {
  text-align: center;
}

.had .story-author-bio-inner {
  position: relative;
  margin: 20px;
}

.had .story-author-bio-inner:before, .had .story-author-bio-inner:after {
  border-top: 1px solid #000;
  content: " ";
  position: absolute;
  left: 0;
  right: 0;
}

.prev-had, .next-had {
  position: absolute;
  top: 50px;
  width: 50%;
  height: 50%;
  text-indent: -99999px;
  overflow: hidden;
}

.next-had {
  left: 50%;
}

html.back-from-the-dead {
  -webkit-filter: invert(100%);
  filter: invert(100%);
  background: #fff;
}

html.claustrophobia-surprise {
  background: linear-gradient(to right, #BF953F, #FCF6BA, #FBF5B7, #AA771C);
  margin-left: 0;
  padding-left: calc(100vw - 100%);
}

html.looney:before {
  content: " ";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: radial-gradient(circle at center, rgb(253,153,56), #bb3636 0, #731319 100%); wine */
  /* background: radial-gradient(circle at center, rgb(253,153,56), red 0, #731319 100%); intense */
  background: radial-gradient(circle at center, #e19a91 0, #d05c4d 75%, #dd061d 100%); /* retro looney pink */
  z-index: -1;
  position: fixed;
}

.claustrophobia-surprise #inner-wrapper, html.looney #inner-wrapper {
  background: transparent;
  box-shadow: none;
}

.claustrophobia-surprise #logo-main img, .claustrophobia-surprise .tracks img,
.looney #logo-main img, .looney .tracks img {
  mix-blend-mode: multiply;
}

.headstone {
  text-align: center;
  background: url(/assets/had/headstone-3a51d5f5b428b33f132c523aa9168241c8d96864f23edf9921bedd795adcb4dc.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  min-height: 245px;
  padding-top: 4em;
}

.headstone > * {
  width: 160px;
  margin: auto;
  padding-right: 22px;
}

html.voicemails #logo-main a img {
  opacity: 0;
  max-width: 100%;
  height: 148px;
}

html.voicemails #logo-main a {
  background: url(/assets/vmskull-e248d825cf16bbdbcf54defda0a446bd1469f1600dee29e470877f7d16b0cd90.png) no-repeat;
  background-size: contain;
  background-position: 50% 50%;
  display: block;
  width: 100%;
  height: 100%;
  margin-bottom: 2em;
}

/* Category Section */
.filter-categories {
  display: flex;
  flex-wrap: wrap; /* Allow categories to wrap to next line if necessary */
  gap: 10px 20px; /* Adds space between items */
  margin-bottom: 20px; /* Spacing between categories and next section */
  justify-content: center;
}

.filter-categories div {
  display: flex;
  align-items: center; /* Vertically align checkboxes and labels */
}

.filter-categories input[type=checkbox] {
  margin-right: 8px; /* Space between checkbox and label */
}

/* Improve readability for the labels */
.filter-categories label {
  font-size: 16px;
  font-weight: 500;
  cursor: pointer; /* Make the label clickable */
  transition: color 0.2s ease;
}

.filter-categories label:hover {
  color: #007acc; /* Change text color on hover for interaction feedback */
}

/* Date Section */
.filter-date, .filter-wordcount {
  display: flex;
  margin-bottom: 20px;
  justify-content: center;
  align-items: center;
}

.filter-date label, .filter-wordcount label {
  display: block; /* Make sure the label is on top of the input */
  font-size: 14px;
  font-weight: 500;
  font-weight: bold;
  flex: 1;
}

.filter-date input, .filter-wordcount input {
  flex: 2;
}

.filter input[type=submit] {
  float: none;
  margin: auto;
}

.filter h2 {
  text-align: center;
  margin-bottom: 20px;
}

.filter-match-type, .filter-debut {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  align-items: center;
}

.filter-match-type input, .filter-debut input {
  margin-left: 10px;
  margin-right: 5px;
}

/* Align date pickers horizontally */
.filter-date, .filter-wordcount {
  display: flex;
  gap: 20px; /* Add space between the two date fields */
  flex-wrap: wrap; /* Allow flexibility on smaller screens */
}

.filter .story-preview-content {
  display: flex;
  justify-content: space-between;
}

.filter .story .title {
  font-size: 1.5em;
}

.filter .story-preview-content {
  padding: 0;
  align-items: center;
}

.filter .story .date {
  text-align: left;
}

.filter .story .author {
  margin: 0;
  text-align: right;
}

.filter-archives .story-preview-content {
  display: flex;
  align-items: center; /* Align the items (date, title, author) vertically centered */
  justify-content: flex-start; /* Ensure elements align to the left */
}

.filter-archives .story-preview-content .date {
  flex: 0 0 120px; /* Set the date to a fixed width of 120px and prevent it from growing or shrinking */
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden; /* Hide overflow if the date is too long */
  text-overflow: ellipsis; /* Add ellipsis (...) if the text overflows */
  color: #555; /* Muted color for the date */
  margin-right: 20px; /* Add some spacing between the date and the title */
}

.filter-archives .story-preview-content .title {
  flex-grow: 1; /* Let the title take up remaining space */
  margin: 5px 0;
}

.filter-archives .story-preview-content .author {
  flex: 0 0 120px;
  margin: 5px 0 5px 10px;
}

/* Responsive Design */
@media (max-width: 600px) {
  .had #archives-results.filter {
    margin-top: 0px;
  }
  .results-count {
    margin-top: 30px;
  }
  .filter-categories {
    flex-direction: column; /* Stack categories vertically on small screens */
    align-content: center;
  }
  .filter-date, .filter-wordcount {
    flex-direction: column; /* Stack date inputs on small screens */
  }
}
@media screen and (max-width: 600px) {
  .had .title-block-large, .had .page-title, .had #archives-results {
    margin-top: -30px;
  }
  #pages-nav {
    display: flex;
    flex-direction: column;
  }
  .had #pages-nav li {
    border-right: 0;
    border-bottom: 1px;
  }
}
/* gamification */
.checkbox-wrap {
  display: flex;
  justify-content: center;
}

.checkbox-wrap input[type=checkbox] {
  cursor: pointer;
  /* Add if not using autoprefixer */
  -webkit-appearance: none;
  appearance: none;
  /* For iOS < 15 to remove gradient background */
  background-color: #fff;
  /* Not removed via appearance */
  margin: 0;
  font: inherit;
  color: #000;
  width: 2em;
  height: 2em;
  border: 1px solid currentColor;
  border-radius: 100%;
  transform: translateY(-0.075em);
  display: grid;
  place-content: center;
}

.checkbox-wrap input[type=checkbox]:disabled {
  --form-control-color: var(--form-control-disabled);
  color: var(--form-control-disabled);
  cursor: not-allowed;
}

.checkbox-wrap input[type=checkbox]:focus {
  outline: max(2px, 0.15em) solid currentColor;
  outline-offset: max(2px, 0.15em);
}

.checkbox-wrap input[type=checkbox]::before {
  content: "";
  background: url(/assets/had/sep1-d37741e58b90a9d0d485aaf3e8886b80244912b0a4a0b4f11666395f3b27bc54.png) no-repeat;
  background-size: 100%;
  width: 1.5em;
  height: 1.5em;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--form-control-color);
  background-color: transparent;
}

.checkbox-wrap input[type=checkbox]:checked::before {
  transform: scale(1);
}

/* on hover, show an icon background on the checkbox */
/* .checkbox-wrap input[type="checkbox"]:hover {
	background: asset-url(/assets/had/sep1-d37741e58b90a9d0d485aaf3e8886b80244912b0a4a0b4f11666395f3b27bc54.png) no-repeat;
	background-size: 100%;
} */
.read-stats {
  width: 110px;
  margin: 1em auto;
}

.read-stats div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
