/* alt.tv.twin-peaks Archive — shared stylesheet */

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

/* ── Skip link ──────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 6px 12px;
  font-size: 13px;
  text-decoration: none;
  z-index: 999;
}

.skip-link:focus { top: 0; }

/* ── Focus styles ───────────────────────────────────────── */

:focus-visible {
  outline: 2px solid #0000cc;
  outline-offset: 2px;
}

body {
  background: #c0c0c0;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  margin: 0;
  padding: 8px;
  color: #000;
}

a { color: #0000cc; }
a:visited { color: #551a8b; }

h1 {
  font-size: 1.35em;
  font-weight: bold;
  margin: 8px 0 4px;
  letter-spacing: .04em;
}

p {
  letter-spacing: .02em;
  line-height: 1.5;
  margin: 0 0 10px;
}

ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

li {
  letter-spacing: .02em;
  line-height: 1.7;
}

hr {
  border: none;
  border-top: 1px solid #808080;
  margin: 12px 0;
}

tt { font-family: "Courier New", Courier, monospace; font-size: 13px; }

/* ── Page shell ─────────────────────────────────────────── */

.page-wrap {
  background: #fff;
  border: 3px outset #c0c0c0;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
}

.page-content {
  padding: 10px 14px 14px;
}

/* ── Homepage: logo header band ─────────────────────────── */

.site-header {
  background: #c0c0c0;
  border-bottom: 2px solid #808080;
  padding: 8px;
  text-align: center;
}

.site-header img {
  max-width: 100%;
  height: auto;
  border: 2px inset #c0c0c0;
}

/* ── Episode pages: sticky nav ──────────────────────────── */

.episode-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #c0c0c0;
  border-bottom: 2px solid #808080;
  padding: 4px 10px;
}

.episode-nav details summary {
  cursor: pointer;
  font-weight: bold;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  list-style: none;
  user-select: none;
}

.episode-nav details summary::-webkit-details-marker { display: none; }

.episode-nav details[open] summary {
  margin-bottom: 4px;
}

.episode-nav ul {
  margin: 0;
  padding: 4px 0 4px 12px;
  columns: 3;
  column-gap: 16px;
  font-size: 13px;
  line-height: 1.8;
}

.episode-nav li { list-style: none; }

/* ── Pagination ─────────────────────────────────────────── */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #808080;
  margin-bottom: 8px;
  font-size: 14px;
}

.pagination-bottom {
  border-top: 1px solid #808080;
  border-bottom: none;
  margin-top: 8px;
  margin-bottom: 0;
}

.pagination a, .pagination span {
  padding: 2px 8px;
  border: 2px outset #c0c0c0;
  background: #c0c0c0;
  text-decoration: none;
  color: #000;
  font-size: 13px;
}

.pagination span { color: #666; border-style: inset; }

/* ── Column headers ─────────────────────────────────────── */

.col-headers {
  display: grid;
  grid-template-columns: 1fr 240px 120px;
  gap: 0 10px;
  padding: 3px 8px;
  background: #c0c0c0;
  border: 1px solid #808080;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 0;
}

/* ── Message accordion ──────────────────────────────────── */

.message-list { margin: 0; }

details.message {
  border: 1px solid #808080;
  border-top: none;
  background: #fff;
}

details.message:first-child { border-top: 1px solid #808080; }

details.message:nth-child(even) { background: #f0f0f0; }

details.message[open] {
  background: #ffffcc;
  border-left: 3px solid #cc9900;
}

summary.msg-header {
  display: grid;
  grid-template-columns: 1fr 240px 120px;
  gap: 0 10px;
  align-items: baseline;
  padding: 4px 8px;
  cursor: pointer;
  list-style: none;
  color: #0000cc;
}

summary.msg-header::-webkit-details-marker { display: none; }

summary.msg-header:hover {
  background: #d0d0ff;
  color: #000;
}

details.message[open] > summary.msg-header {
  color: #000;
  font-weight: bold;
}

.subject {
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.from {
  font-size: 13px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date {
  font-size: 13px;
  color: #444;
  white-space: nowrap;
}

.src-link {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #888;
  text-decoration: none;
  margin-top: 4px;
}

.src-link:hover { color: #0000cc; text-decoration: underline; }

.msg-body {
  padding: 8px 10px;
  border-top: 1px solid #c0c0c0;
}

.msg-body pre {
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 8px;
  line-height: 1.5;
}

a.full-link {
  display: inline-block;
  font-size: 13px;
  color: #0000cc;
  border: 2px outset #c0c0c0;
  background: #c0c0c0;
  padding: 2px 8px;
  text-decoration: none;
}

a.full-link:hover { border-style: inset; }

p.description {
  margin: 0 0 10px;
  line-height: 1.5;
  letter-spacing: .02em;
}

/* ── Homepage: episode list rows ────────────────────────── */

.ep-col-headers {
  grid-template-columns: 1fr 210px;
}

.episode-list { margin: 0; }

a.episode-row {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 0 10px;
  align-items: baseline;
  padding: 4px 8px;
  border: 1px solid #808080;
  border-top: none;
  text-decoration: none;
  color: #0000cc;
}

a.episode-row:first-child { border-top: 1px solid #808080; }
a.episode-row:nth-child(even) { background: #f0f0f0; }
a.episode-row:visited { color: #551a8b; }
a.episode-row:hover { background: #d0d0ff; color: #000; }

.ep-title {
  font-weight: bold;
}

.ep-title em {
  font-weight: normal;
  font-size: 13px;
  color: #444;
}

.ep-dates {
  font-size: 13px;
  color: #444;
  white-space: nowrap;
}
