/* TWoP Archive - Faithful to the original Television Without Pity design */

:root {
  --red: #990000;
  --dark-red: #660000;
  --yellow: #ffcc00;
  --dark-yellow: #cc9900;
  --light-gray: #f0f0f0;
  --medium-gray: #cccccc;
  --dark-gray: #666666;
  --text: #333333;
  --white: #ffffff;
  --link: #990000;
  --link-hover: #cc0000;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* === HEADER === */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--yellow);
  padding: 10px 0;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}

.site-logo {
  font-family: 'Georgia', serif;
  font-size: 24px;
  font-weight: bold;
  color: var(--red);
  text-decoration: none;
}

.site-logo:hover { text-decoration: none; color: var(--dark-red); }

.site-logo .tagline {
  display: block;
  font-size: 10px;
  font-style: italic;
  color: var(--dark-gray);
  font-weight: normal;
}

.header-nav {
  display: flex;
  gap: 4px;
}

.header-nav a {
  display: inline-block;
  padding: 6px 12px;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
}

.header-nav a:hover {
  background: var(--dark-red);
  text-decoration: none;
}

/* === SUB NAV === */
.sub-nav {
  background: var(--yellow);
  padding: 4px 0;
  text-align: center;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
}

.sub-nav a {
  color: var(--dark-red);
  padding: 0 8px;
}

/* === MAIN LAYOUT === */
.page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}

.main-content { min-width: 0; }
.sidebar { min-width: 0; }

/* === ARCHIVE NOTICE === */
.archive-notice {
  background: #fff8e1;
  border: 1px solid var(--dark-yellow);
  border-left: 4px solid var(--dark-yellow);
  padding: 8px 12px;
  margin-bottom: 15px;
  font-size: 11px;
}

.archive-notice strong { color: var(--dark-red); }

/* === SECTION HEADERS (pixel-art style) === */
.section-header {
  background: var(--light-gray);
  border-bottom: 2px solid var(--red);
  padding: 6px 10px;
  margin-bottom: 10px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: bold;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === FEATURED CARDS === */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.featured-card {
  border: 1px solid var(--medium-gray);
  background: var(--white);
}

.featured-card .card-header {
  background: var(--light-gray);
  padding: 8px 10px;
  border-bottom: 2px solid var(--yellow);
}

.featured-card .card-header h3 {
  font-size: 14px;
  font-weight: bold;
  color: var(--dark-red);
  margin: 0;
}

.featured-card .card-header h3 a { color: var(--dark-red); }

.featured-card .card-body {
  padding: 10px;
}

.featured-card .card-body .show-label {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--dark-gray);
  margin-bottom: 4px;
}

.featured-card .card-body .excerpt {
  font-size: 11px;
  color: var(--text);
  line-height: 1.5;
}

.featured-card .get-recaps {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
}

.featured-card .get-recaps:hover { background: var(--dark-red); text-decoration: none; }

/* === SHOW GRID === */
.show-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 2px 10px;
}

.show-grid li {
  padding: 3px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 11px;
}

.show-grid a { font-weight: bold; }
.show-grid .count { color: var(--dark-gray); font-size: 10px; }

/* === SIDEBAR === */
.sidebar-box {
  border: 1px solid var(--medium-gray);
  margin-bottom: 15px;
}

.sidebar-box .sidebar-header {
  background: var(--light-gray);
  border-bottom: 2px solid var(--red);
  padding: 6px 10px;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: bold;
  color: var(--red);
  text-transform: uppercase;
}

.sidebar-box .sidebar-body {
  padding: 8px 10px;
}

.sidebar-box .sidebar-body ul {
  list-style: none;
}

.sidebar-box .sidebar-body li {
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 11px;
}

.sidebar-box .sidebar-body li:last-child { border-bottom: none; }

.sidebar-box .sidebar-body .date {
  font-size: 10px;
  color: var(--dark-gray);
  font-weight: bold;
}

/* === LATEST RECAPS TABLE === */
.latest-recaps {
  margin-top: 20px;
}

.latest-recaps table {
  width: 100%;
  border-collapse: collapse;
}

.latest-recaps th {
  background: var(--light-gray);
  border-bottom: 2px solid var(--red);
  padding: 5px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--dark-red);
}

.latest-recaps td {
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 11px;
  vertical-align: top;
}

.latest-recaps .show-name { font-weight: bold; color: var(--dark-red); text-transform: uppercase; font-size: 10px; }
.latest-recaps .ep-title { font-weight: bold; }
.latest-recaps .ep-type { font-size: 10px; color: var(--dark-gray); }

/* === STATS BAR === */
.stats-bar {
  background: var(--light-gray);
  padding: 6px 12px;
  margin-bottom: 15px;
  font-size: 11px;
  color: var(--dark-gray);
  border-left: 3px solid var(--red);
}

.stats-bar strong { color: var(--red); }

/* === PAGE CONTENT (recap pages) === */
.page-wrap.narrow { max-width: 720px; }

.breadcrumb {
  font-size: 11px;
  color: var(--dark-gray);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.episode-nav {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 6px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin: 6px 0;
}

.episode-nav a { max-width: 40%; }

article h1 {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--red);
  margin-bottom: 4px;
  line-height: 1.3;
}

.byline {
  font-size: 11px;
  color: var(--dark-gray);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--medium-gray);
}

.byline strong { color: var(--text); }

.page-pagination {
  font-size: 11px;
  padding: 4px 8px;
  background: var(--light-gray);
  border: 1px solid var(--medium-gray);
  margin: 6px 0;
}

.page-pagination strong { color: var(--red); }

.page-content {
  font-size: 12px;
  line-height: 1.7;
}

.page-content p { margin-bottom: 1em; }
.page-content b, .page-content strong { color: var(--text); }
.page-content i, .page-content em { color: #555; }
.page-content blockquote { margin: 1em 0; padding: 8px 15px; border-left: 3px solid var(--yellow); background: #fafafa; }
.page-content hr { border: none; border-top: 1px solid var(--medium-gray); margin: 1.5em 0; }
.page-content table { border-collapse: collapse; margin: 1em 0; }
.page-content td, .page-content th { padding: 4px 8px; border: 1px solid #ddd; font-size: 11px; }

.dead-link { color: #999; text-decoration: line-through; cursor: help; }

/* === PROVENANCE === */
.provenance-box { font-size: 11px; margin-top: 20px; }
.provenance-box summary { cursor: pointer; color: var(--dark-gray); font-weight: bold; }
.provenance-box dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin-top: 6px; padding: 8px; background: #f8f8f5; border: 1px solid #ddd; }
.provenance-box dt { font-weight: bold; }
.provenance-box dd { word-break: break-all; }
.provenance-box code { font-size: 10px; background: rgba(0,0,0,.05); padding: 1px 3px; }

.archive-notice-small { font-size: 10px; color: var(--dark-gray); margin-top: 15px; padding-top: 8px; border-top: 1px solid #eee; }

/* === SHOW PAGE === */
.show-page h1 { font-family: Georgia, serif; font-size: 22px; color: var(--red); margin-bottom: 4px; }
.show-page .meta { font-size: 11px; color: var(--dark-gray); margin-bottom: 15px; }

.episode-list { list-style: none; }
.episode-list li { padding: 5px 0; border-bottom: 1px solid #f0f0f0; font-size: 11px; }
.episode-list a { font-weight: bold; }
.episode-list .recapper { color: var(--dark-gray); font-size: 10px; }

h2 {
  font-family: Georgia, serif;
  font-size: 15px;
  color: var(--red);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 4px;
  margin: 20px 0 8px;
}

/* === FOOTER === */
.site-footer {
  max-width: 1000px;
  margin: 30px auto 0;
  padding: 10px 15px;
  border-top: 3px solid var(--yellow);
  font-size: 10px;
  color: var(--dark-gray);
  text-align: center;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .main-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 10px; }
  .header-nav { flex-wrap: wrap; justify-content: center; }
}

/* === HERO === */
.hero {
  text-align: center;
  padding: 30px 20px 25px;
  border-bottom: 3px solid var(--yellow);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: Georgia, serif;
  font-size: 26px;
  color: var(--red);
  margin-bottom: 8px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 13px;
  color: var(--dark-gray);
  margin-bottom: 18px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto 15px;
}

.hero-search .pagefind-ui__search-input {
  font-size: 14px !important;
  padding: 10px 14px !important;
  border: 2px solid var(--medium-gray) !important;
  border-radius: 4px !important;
}

.hero-search .pagefind-ui__search-input:focus {
  border-color: var(--red) !important;
  outline: none !important;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--red);
  color: var(--white) !important;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none !important;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.action-btn:hover {
  background: var(--dark-red);
}

.see-all {
  font-size: 11px;
  margin-top: 6px;
}

.see-all a {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
