/* =========================================================
   DATABASE STYLESHEET: calm pastel look
   Change the look by editing the colors in the :root block below.
   Pure CSS, no images.
   ========================================================= */

:root {
  --gutter: 1.5rem;         /* space between the screen edge and the content */
  --page-bg: #6f5aa8;
  --text: #2b2540;
  --font: Georgia, "Times New Roman", serif;
  --font-head: "Courier New", Courier, "Lucida Console", monospace;
  --head-transform: uppercase;

  --header-bg: #A64D79;
  --header-text: #2b2540;
  --header-line: #01CDFE;
  --h1-shadow: none;
  --intro: #3a3358;
  --kicker-bg: #F1C232;
  --kicker-text: #2b2540;

  --line: #FF71CE;          /* outlines */
  --bw: 2px;                /* outline thickness */
  --radius: 4px;
  --pill: 4px;            /* button roundness */
  --shadow-card: 0 6px 14px rgba(79, 63, 134, 0.2);
  --shadow-small: none;

  --panel: #7ADBF0;
  --panel-text: #2b2540;
  --panel-label: #4b2f99;
  --input-bg: #ffffff;
  --input-text: #2b2540;

  --card: #E4EEFF;
  --card-text: #2b2540;
  --label: #4b2f99;         /* "ACTOR", "SHOWS" labels on cards */
  --muted: #51496e;
  --accent: #f4a259;
  --accent2: #b9a4e8;
  --accent3: #1f6f7e;       /* release date / runtime line */
  --danger: #c43d4f;        /* spoiler stamp, notes title */
  --c1: #b9a4e8; --c2: #ffc08a; --c3: #9fd3f0; --c4: #a8dfc4;  /* card top edges: lavender, peach, sky, mint */

  --btn-bg: #f4a259;
  --btn-text: #2b2540;
  --btn-hover: #05FFA1;

  --menu-bg: #6f5aa8;
  --menu-line: #f4a259;
  --menu-btn: #fff8ef;
  --menu-btn-text: #2b2540;
  --menu-hover: #05FFA1;

  /* old names, so devlog.html keeps working */
  --ink: var(--line);
  --cream: var(--card);
  --orange: var(--accent);
  --pink: var(--accent2);
}

/* =========================================================
   EVERYTHING BELOW USES THE COLORS ABOVE. Usually no need to edit.
   ========================================================= */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--page-bg);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
}

main {
  max-width: calc(760px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;   /* side space around the search box and results */
}

.entry, dialog, #status { overflow-wrap: anywhere; }

/* Safety net: on pages that forgot the <main> wrapper, line any other
   top-level content up with the menu and the rest of the site. */
body > :not(nav):not(header):not(footer):not(main):not(script):not(dialog):not(br) {
  max-width: calc(760px + 2 * var(--gutter));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  margin: 0 0 1.75rem;
  padding: 2rem var(--gutter) 1.5rem;
  background: var(--header-bg);
  border-bottom: 5px solid var(--header-line);
  text-align: center;
}

.site-header > * { max-width: 760px; margin-left: auto; margin-right: auto; }

.kicker {
  display: inline-block;
  margin-top: 0;
  margin-bottom: 0.35rem;
  padding: 0.1rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--kicker-text);
  background: var(--kicker-bg);
  border: 2px solid var(--header-line);
  border-radius: var(--pill);
}

h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 7vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  text-transform: var(--head-transform);
  color: var(--header-text);
  text-shadow: var(--h1-shadow);
}

.intro { margin: 0.75rem auto 0; color: var(--intro); font-weight: 600; }

/* ---------- Main menu (slim, one row when there is room) ---------- */
nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 0;
  padding: 0.75rem max(var(--gutter), calc((100% - 760px) / 2)) 0.45rem;
  background: var(--menu-bg);
  border-bottom: 3px solid var(--menu-line);
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 100%;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav li { flex: 0 0 auto; }

nav a {
  display: block;
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--menu-btn-text);
  background: var(--menu-btn);
  border: 2px solid var(--menu-btn);
  border-radius: var(--pill);
}

nav a:hover { background: var(--menu-hover); border-color: var(--menu-hover); }
nav a[aria-current="page"] { background: var(--menu-line); border-color: var(--menu-line); }

/* the stray <br> tags in the menu and after it just add empty space */
nav br,
nav + br,
body > br { display: none; }

nav .menu-dropdown {
  flex: 1 1 100%;
  max-width: 320px;
  min-height: 36px;
  margin: 0;
  padding: 0.3rem 0.8rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--menu-btn-text);
  background: var(--menu-btn);
  border: 2px solid var(--menu-btn);
  border-radius: var(--pill);
  cursor: pointer;
}

nav .menu-dropdown:hover { background: var(--menu-hover); border-color: var(--menu-hover); }

@media (max-width: 480px) {
  nav a { padding: 0.4rem 0.55rem; font-size: 0.72rem; }
}

/* ---------- Plain pages (About, FAQ, show pages...) ----------
   Gives ordinary headings, links and lists on those pages the noir colors.
   Only direct children of <main> are touched, so the database cards are unaffected. */

main > h2,
main > h3,
main > h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  text-transform: var(--head-transform);
  color: var(--text);
}

main > p,
main > ul,
main > ol { color: var(--text); }

main a { color: var(--label); text-decoration: underline; }
main a:hover { color: var(--text); }

/* ---------- Search panel ---------- */

.search-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  color: var(--panel-text);
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.field { display: grid; gap: 0.35rem; }

label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-label);
}

input[type="search"],
select {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  font: inherit;
  color: var(--input-text);
  background: var(--input-bg);
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
}

input[type="search"]::placeholder { color: #6d6a73; }

input:focus-visible,
select:focus-visible,
button:focus-visible,
nav a:focus-visible {
  outline: 4px solid var(--label);
  outline-offset: 2px;
}

.toggle { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; cursor: pointer; }
.toggle input { width: 24px; height: 24px; accent-color: var(--danger); }
.toggle span { font-size: 0.95rem; font-weight: 700; color: var(--panel-text); }
.theme-field { grid-column: 1 / -1; }

/* ---------- Result count ---------- */

#status {
  margin: 1.5rem 0 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--card-text);
  background: var(--card);
  border: var(--bw) solid var(--line);
  border-left: 12px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

/* ---------- Result cards ---------- */

#results { display: grid; gap: 1.5rem; }

.entry {
  position: relative;
  padding: 1.1rem 1.25rem 1.25rem;
  color: var(--card-text);
  background: var(--card);
  border: var(--bw) solid var(--line);
  border-top: 14px solid var(--c1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.entry:nth-child(4n+2) { border-top-color: var(--c2); }
.entry:nth-child(4n+3) { border-top-color: var(--c3); }
.entry:nth-child(4n+4) { border-top-color: var(--c4); }

.entry h2,
dialog h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: var(--head-transform);
}

dl { margin: 0; }

dt {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
}

dd { margin: 0.2rem 0 0; }

ul.items { margin: 0; padding: 0; list-style: none; }
ul.items li { margin: 0.5rem 0; padding-left: 0.8rem; border-left: 4px solid var(--accent); }
ul.items li p { margin: 0.2rem 0 0; }

.episode-meta { font-size: 0.85rem; font-weight: 700; color: var(--accent3); }
.episode-notes { font-size: 0.95rem; font-style: italic; color: var(--muted); }

/* The words "Episode notes:" before the note text */
.episode-notes-label { font-weight: 800; font-style: normal; color: var(--danger); }

/* ---------- Buttons ---------- */

.details-button,
.close-button {
  min-height: 44px;
  padding: 0.5rem 1.2rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: var(--bw) solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow-small);
  cursor: pointer;
}

.details-button { margin-top: 1rem; }
.details-button:hover,
.close-button:hover { background: var(--btn-hover); }
.details-button:active,
.close-button:active { transform: translate(2px, 2px); }

/* ---------- Spoilers ---------- */

.entry.spoiler { border-top-color: var(--danger); }

.entry.spoiler h2::after,
dialog .spoiler h2::after {
  content: "Spoiler";
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.05rem 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--danger);
  border: 2px solid var(--line);
  border-radius: 6px;
  transform: rotate(-4deg);
  vertical-align: middle;
}

/* ---------- Details popup ---------- */

dialog {
  width: min(88vw, 640px);
  max-height: 85vh;
  padding: 1.25rem;
  overflow: hidden;
  color: var(--card-text);
  background: var(--card);
  border: 4px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--line);
}

dialog[open] { display: flex; flex-direction: column; }
dialog > div { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
dialog::backdrop { background: rgba(43, 37, 64, 0.6); }
dialog .close-button { flex: 0 0 auto; align-self: flex-end; margin: 0 0 0.75rem; }

/* ---------- Footer ---------- */

.site-footer {
  margin: 0;
  padding: 1.5rem var(--gutter) 2rem;
  text-align: center;
  color: var(--header-text);
  background: var(--header-bg);
  border-top: 5px solid var(--header-line);
}

.site-footer p { max-width: 760px; margin: 0.35rem auto; }

.footer-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: var(--head-transform);
}

.footer-links a { color: var(--header-text); font-weight: 700; text-decoration: underline; }
.footer-links a:hover { color: var(--label); }
.footer-note { font-size: 0.85rem; opacity: 0.85; }

/* ---------- Bigger screens ---------- */

@media (min-width: 700px) {
  .search-panel { grid-template-columns: 2fr 1fr; align-items: end; }
  .toggle { grid-column: 1 / -1; }
}

/* Podcast Guest List & Spoilers */
.guest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 500px;
}

.guest-item {
  padding: 12px 0;
  border-bottom: 1px solid #ddd;
}

.guest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.guest-name {
  font-weight: bold;
  font-size: 1.1em;
}

.guest-links a {
  font-size: 0.85em;
  margin-left: 10px;
  text-decoration: none;
  color: #0066cc;
}

.guest-links a:hover {
  text-decoration: underline;
}

.spoiler-box summary {
  cursor: pointer;
  font-size: 0.9em;
  color: #555;
  user-select: none;
}

.spoiler-content {
  margin-top: 8px;
  padding: 10px;
  background-color: #f4f4f4;
  border-left: 3px solid #888;
  font-size: 0.95em;
}

