/* ============================================
   CANCER CELLS BREAKING BAD
   Warm cream editorial + Breaking Bad colour map
   ============================================ */

:root {
  --bg: #10130d;
  --panel: #f8f4e7;
  --panel-alt: #fffdf4;
  --ink: #1b1c17;
  --muted: #5e6258;
  --green: #244b32;
  --acid: #b4c54a;
  --purple: #6d4c91;
  --pink: #c95683;
  --blue: #287ea8;
  --gold: #b08a3d;
  --line: #d8cfb8;
  --cells-color: #c95683;
}

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

body {
  background: radial-gradient(circle at top left, #2d3d1e 0, #10130d 42%, #060806 100%);
  color: var(--ink);
  font-family: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

/* ---- LAYOUT ---- */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 18px 64px;
}

.hero {
  background: linear-gradient(135deg, rgba(248,244,231,.97), rgba(234,228,204,.97));
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
  overflow: hidden;
}

/* ---- HEADER ---- */
header {
  padding: 42px 46px 30px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.author-note {
  position: absolute;
  top: 18px;
  right: 28px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  text-align: right;
  max-width: 340px;
  line-height: 1.45;
}

.periodic {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.tile {
  width: 74px;
  height: 74px;
  border: 2px solid #ebefe0;
  background: linear-gradient(145deg, #2f6540, #5d8b48);
  color: #f1d6ff;
  display: grid;
  grid-template-rows: 18px 1fr 17px;
  padding: 5px 6px;
  box-shadow: inset 0 0 16px rgba(255,255,255,.18);
}

.tile small {
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
}

.tile b {
  font-family: Arial, sans-serif;
  font-size: 36px;
  line-height: 1;
  align-self: center;
}

h1 {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: clamp(36px, 5.5vw, 62px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  margin: 0 0 18px;
  color: var(--green);
  letter-spacing: 1px;
}

.cells {
  color: var(--cells-color);
}

.subtitle {
  font-size: 18px;
  max-width: 760px;
  color: #3d4235;
  margin: 0;
  line-height: 1.6;
}

/* ---- BLUE METH BANNER ---- */
.blue-meth-banner {
  position: relative;
  overflow: hidden;
  padding: 10px 46px;
  background: linear-gradient(135deg, #0a1628 0%, #0d2137 40%, #122a42 100%);
  border-top: 1px solid rgba(72, 202, 228, 0.15);
  border-bottom: 1px solid rgba(72, 202, 228, 0.15);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 2;
}

.crystal-img {
  flex-shrink: 0;
  width: 70px;
  height: 58px;
}

.crystals {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(0, 180, 216, 0.4));
}

.sparkle {
  animation: sparkle 2.5s ease-in-out infinite;
}
.s1 { animation-delay: 0s; }
.s2 { animation-delay: 0.5s; }
.s3 { animation-delay: 1.1s; }
.s4 { animation-delay: 1.6s; }
.s5 { animation-delay: 0.8s; }

@keyframes sparkle {
  0%, 100% { opacity: 0.2; r: 0.8; }
  50% { opacity: 1; r: 2; }
}

.banner-text {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: clamp(14px, 2.2vw, 20px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #caf0f8;
  line-height: 1.3;
  margin: 0;
}

.banner-text .eq {
  color: #48cae4;
  font-weight: 700;
  padding: 0 4px;
}

.banner-text .paren {
  color: #90e0ef;
  font-weight: 400;
  font-size: 0.85em;
}

/* Twinkle particles */
.twinkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ade8f4;
  border-radius: 50%;
  animation: twinkleAnim 3s ease-in-out infinite;
  box-shadow: 0 0 6px 2px rgba(173, 232, 244, 0.5);
}

.t1 { top: 15%; left: 12%; animation-delay: 0s; animation-duration: 2.8s; }
.t2 { top: 70%; left: 35%; animation-delay: 0.7s; animation-duration: 3.2s; }
.t3 { top: 25%; right: 18%; animation-delay: 1.4s; animation-duration: 2.5s; }
.t4 { top: 65%; right: 8%; animation-delay: 0.3s; animation-duration: 3.5s; }
.t5 { top: 40%; left: 55%; animation-delay: 2.0s; animation-duration: 2.9s; }

@keyframes twinkleAnim {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.5); }
}

@media (max-width: 760px) {
  .blue-meth-banner { padding: 22px; }
  .banner-content { flex-direction: column; gap: 14px; text-align: center; }
  .crystal-img { width: 80px; height: 68px; }
}

/* ---- MAIN ---- */
main {
  padding: 34px 46px 42px;
  background: var(--panel);
}

.lead {
  font-size: 19px;
  color: #30342d;
}

h2 {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: 26px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green);
  margin: 30px 0 8px;
  line-height: 1.15;
}

h3 {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: 19px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #2e392b;
  margin: 22px 0 6px;
}

p { margin: 10px 0 14px; }

/* ---- GRID CARDS ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.card {
  border: 1px solid var(--line);
  background: var(--panel-alt);
  border-radius: 16px;
  padding: 18px;
  min-height: 135px;
}

.card p {
  font-size: 15px;
  color: var(--muted);
}

.tag {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
  color: white;
}

.pink { background: var(--pink); }
.purple { background: var(--purple); }
.blue { background: var(--blue); }
.green { background: var(--green); }
.gold { background: var(--gold); }
.acid { background: #849321; }

/* ---- CHARACTER NAME COLOURS ---- */
.c-marie { color: var(--purple); font-weight: 700; }
.c-jesse { color: var(--pink); font-weight: 700; }
.c-agency { color: #000; font-weight: 700; }
.c-gold { color: var(--gold); font-weight: 700; }

/* ---- TABLES ---- */
.table-wrap {
  overflow-x: auto;
  margin: 18px 0 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--panel-alt);
  min-width: 600px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 13px;
  vertical-align: top;
  text-align: left;
}

th {
  background: #e9e1c8;
  color: #243323;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

tr:last-child td { border-bottom: 0; }

/* ---- PULL QUOTE ---- */
.pull {
  margin: 26px 0;
  padding: 24px 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #253d2a, #5b3d68);
  color: #fff9df;
  font-size: 23px;
  line-height: 1.35;
}

/* ---- SCORE GRID ---- */
.score {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 20px 0 28px;
}

.score div {
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  font-size: 14px;
}

.score b {
  display: block;
  color: var(--green);
  margin-bottom: 4px;
}

/* ---- NOTE ---- */
.note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 5px solid var(--gold);
  background: rgba(176,138,61,.10);
  color: #3f3829;
  font-size: 15px;
  border-radius: 0 12px 12px 0;
}

/* ---- LISTS ---- */
ol, ul { padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: #1c6f94; }
a:hover { color: #144d68; }

/* ---- REFERENCES ---- */
.refs {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 34px;
}

.refs h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.refs li { margin-bottom: 7px; }

/* ---- FORUM SECTION ---- */
.forum {
  padding: 34px 46px 42px;
  background: #eee8d5;
  border-top: 1px solid var(--line);
}

.forum-header {
  margin-bottom: 20px;
}

.forum h2 {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: 26px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green);
  margin: 8px 0 4px;
}

.forum-intro {
  color: var(--muted);
  font-size: 15px;
}

/* ---- COMMENT FORM ---- */
.comment-form {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b0a990;
  font-style: italic;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(36, 75, 50, 0.12);
}

button[type="submit"] {
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--green);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

button[type="submit"]:hover {
  background: #1b3a26;
  transform: translateY(-1px);
}

button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---- COMMENTS ---- */
.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.comment:last-child { border-bottom: none; }

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.comment-header strong {
  color: var(--green);
  font-size: 15px;
}

.comment-header time {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #b0a990;
  letter-spacing: .03em;
}

.comment p {
  color: var(--muted);
  font-size: 15px;
  white-space: pre-wrap;
  word-break: break-word;
}

.loading, .no-comments {
  text-align: center;
  color: #b0a990;
  font-style: italic;
  padding: 24px 0;
}

.error {
  text-align: center;
  color: var(--pink);
  padding: 24px 0;
}

/* ---- FOOTER ---- */
footer {
  padding: 22px 46px 30px;
  background: #e4dcc5;
  color: #4c4b42;
  font-size: 13px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 26px 26px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 760px) {
  header, main, .forum, footer { padding-left: 22px; padding-right: 22px; }
  .grid, .score { grid-template-columns: 1fr; }
  .tile { width: 64px; height: 64px; }
  .tile b { font-size: 31px; }
  .comment-header { flex-direction: column; gap: 2px; }
  .pull { font-size: 19px; padding: 18px 20px; }
}

@media print {
  body { background: white; }
  .wrap { padding: 0; max-width: none; }
  .hero { box-shadow: none; border-radius: 0; }
  a { color: black; text-decoration: none; }
}

/* ---- SCENE GALLERY ---- */
.scene-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 30px 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  padding: 14px;
}

.scene-img {
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
}

.scene-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

@media (max-width: 760px) {
  .scene-gallery { grid-template-columns: 1fr; }
}

/* ---- CONTACT LINK ---- */
.contact-link {
  margin-top: 12px;
}

.contact-link a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .03em;
}

.contact-link a:hover {
  text-decoration: underline;
  color: #1b3a26;
}

/* ---- SELECTION ---- */
::selection {
  background: var(--green);
  color: #fff;
}
