#search-results.had-results-list {
  max-width: 650px;
  margin: 0 auto;
}

.had-results-list .results-header {
  margin-top: 15px;
  padding: 6px 0 10px;
  display: grid;
  align-items: center;
  gap: 12px;
}

.had-results-list .results-header .sort-btn {
  background: none;
  border: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  font-weight: 600;
  padding: 0 4px 2px;
  width: 100%;
  text-align: left;
}

.had-results-list .results-header .sort-btn.active {
  color: #000;
  text-decoration: underline;
}

.had-results-list .results-header .sort-btn:focus {
  outline: 1px dotted #000;
}

button.sort-btn[data-sort=author],
button.sort-btn[data-sort=views],
button.sort-btn[data-sort=words] {
  text-align: right !important;
}

/* .had-results-list .story wrapper present for data attributes; no direct styles needed */
.had-results-list .story-preview-content {
  text-align: left;
  padding: 6px 0;
}

.had-results-list .story:last-child .story-preview-content {
  border-bottom: 0;
}

.had-results-list .story-preview-content .title {
  font-size: 1.05rem;
  margin: 4px 0 2px;
}

.had-results-list .story-preview-content .author {
  font-size: 0.8rem;
  margin: 2px 0;
}

.had-results-list .story-preview-content .views-meta, .had-results-list .story-preview-content .words-meta {
  font-size: 0.65rem;
  margin: 2px 0;
  color: #444;
  letter-spacing: 0.5px;
}

@media (max-width: 720px) {
  .had-results-list .results-header {
    flex-wrap: wrap;
  }
  .had-results-list .results-header .sort-btn {
    flex: 1 0 33%;
    text-align: left;
  }
}
: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;
}

/* Table styles for sortable filter results */
#search-results.sortable {
  width: 100%;
  border-collapse: collapse;
}

#search-results.sortable thead th {
  padding: 6px 4px 10px;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

#search-results.sortable tbody td {
  padding: 10px 4px 12px;
  border-bottom: 1px solid #d6d6d6;
  vertical-align: top;
}

#search-results.sortable tbody tr:hover {
  background: #fafafa;
}

#search-results.sortable tbody tr:last-child td {
  border-bottom: 0;
}

#search-results.sortable td a {
  text-decoration: none;
  font-weight: 600;
}

/* Column specific widths and behavior */
.had-results-table .date-cell {
  width: 140px;
  white-space: nowrap;
  font-size: 0.8rem;
  color: #444;
}

.had-results-table .author-cell {
  width: 160px;
  font-size: 0.8rem;
  text-align: left;
}

.had-results-table .views-cell {
  width: 80px;
  text-align: right;
  font-size: 0.75rem;
  color: #333;
}

.had-results-table .words-cell {
  width: 70px;
  text-align: right;
  font-size: 0.75rem;
  color: #333;
}

.had-results-table .title-cell {
  font-size: 0.95rem;
  line-height: 1.25rem;
}

/* Improve contrast for 0 views subtly */
.had-results-table .views-cell {
  opacity: 0.85;
}

.had-results-table .views-cell:empty {
  opacity: 0.3;
}

/* Responsive: stack cells except title */
@media (max-width: 720px) {
  #search-results.sortable thead {
    display: none;
  }
  #search-results.sortable tbody td {
    display: block;
    border-bottom: 0;
    padding: 4px 8px;
  }
  #search-results.sortable tbody tr {
    border: 1px solid #e5e5e5;
    margin-bottom: 10px;
    display: block;
    background: #fff;
  }
  .had-results-table .date-cell {
    font-weight: 600;
  }
  .had-results-table .author-cell, .had-results-table .views-cell, .had-results-table .words-cell {
    text-align: left;
  }
  .had-results-table .title-cell {
    padding-top: 2px;
    padding-bottom: 4px;
  }
}
/* Compact modifier to more closely resemble legacy list styling */
.had-results-table.compact thead th {
  font-size: 0.7rem;
  letter-spacing: 0.25px;
  font-weight: 500;
  padding: 4px 4px 6px;
}

.had-results-table.compact tbody td {
  padding: 6px 4px 8px;
}

.had-results-table.compact tbody tr {
  transition: background 0.15s ease;
}

.had-results-table.compact tbody tr:hover {
  background: #fdfdfd;
}

.had-results-table.compact .title-cell a {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.15rem;
}

.had-results-table.compact .author-cell {
  font-size: 0.75rem;
  color: #333;
}

.had-results-table.compact .date-cell {
  font-size: 0.7rem;
  color: #555;
}

.had-results-table.compact .views-cell, .had-results-table.compact .words-cell {
  font-size: 0.7rem;
}

/* Ellipsis handling for long titles */
.had-results-table.compact .title-cell {
  max-width: 420px;
}

.had-results-table.compact .title-cell a {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .had-results-table.compact .title-cell {
    max-width: 300px;
  }
}
@media (max-width: 720px) {
  .had-results-table.compact .title-cell a {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }
}
.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;
}

/* Float / align view counters to the far right of filter results */
/* Unified grid for filter results: headers and rows align by columns */
.had-results-list.show-views .results-header,
.had-results-list.show-views .story-preview-content {
  display: grid;
  grid-template-columns: 140px 1fr 80px 50px 70px; /* date | title | author | views | words */
  gap: 12px;
}

.had-results-list:not(.show-views) .results-header,
.had-results-list:not(.show-views) .story-preview-content {
  display: grid;
  grid-template-columns: 140px 1fr 160px 70px; /* date | title | author | words */
  gap: 12px;
}

/* Cell styles */
.had-results-list .results-header .sort-btn {
  justify-self: start;
}

.had-results-list .story-preview-content .date,
.had-results-list .story-preview-content .title,
.had-results-list .story-preview-content .author,
.had-results-list .story-preview-content .views-meta,
.had-results-list .story-preview-content .words-meta {
  margin: 0;
  padding: 0;
  line-height: 1.15rem;
}

.had-results-list .story-preview-content .date {
  color: #555;
  font-size: 0.65rem;
  white-space: nowrap;
}

.had-results-list .story-preview-content .title {
  font-size: 0.8rem;
}

.had-results-list .story-preview-content .author {
  font-size: 0.6rem;
  color: #333;
}

.had-results-list .story-preview-content .views-meta, .had-results-list .story-preview-content .words-meta {
  font-size: 0.6rem;
  color: #555;
  text-align: right;
}

/* Ensure long titles wrap but keep column alignment */
.had-results-list .story-preview-content .title {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  /* Stack to two-row blocks per story on small screens */
  .had-results-list .results-header {
    display: flex;
    flex-wrap: wrap;
  }
  .had-results-list .results-header .sort-btn {
    flex: 1 0 33%;
    width: auto;
  }
  .had-results-list .story-preview-content {
    display: block;
  }
  .had-results-list .story-preview-content .date {
    display: block;
    margin-bottom: 4px;
  }
  .had-results-list .story-preview-content .author, .had-results-list .story-preview-content .views-meta, .had-results-list .story-preview-content .words-meta {
    display: inline-block;
    margin-right: 12px;
    line-height: 1.2rem;
  }
  .had-results-list .story-preview-content .words-meta {
    margin-right: 0;
  }
}
@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;
}
