    :root{
      --app-bg:#f3f4f6;
      --paper:#fff;
      --ink:#0b0f14;
      --muted:#3b4552;
      --rule:rgba(11,15,20,.18);
      --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", Courier, monospace;

      --page-width:1100px;
      --page-pad:28px;
      --gutter:26px;

      --slug-size:15px;
      --body-size:16px;

      --left-margin:14px;

      --char-indent:270px;
      --paren-indent:170px;
      --dialogue-indent:170px;
      --dialogue-width:500px;

      --anno: rgba(59,130,246,.95);
      --anno-soft: rgba(59,130,246,.16);
      --focus-ring: rgba(59,130,246,.45);

      --notes-top: 0px;
      --notes-offset: 22px;

      --marker-size: 30px;
      --marker-lane-desktop: 14px;
      --marker-gap: 20px;
      --marker-safe: 64px;
      --marker-hide-threshold: 24px;

      --hover: rgba(59,130,246,.10);
      --hover-border: rgba(59,130,246,.55);
      
      --sheet-top: 100vh; /* default: sheet is effectively “off screen” */
    }

    html, body { height:100%; }
    body{
      margin:0;
      background:var(--app-bg);
      color:var(--ink);
      font-family:var(--mono);
      line-height:1.4;
    }

    header{
      position:sticky; top:0; z-index:50;
      background:rgba(243,244,246,.92);
      backdrop-filter: blur(8px);
      border-bottom:1px solid var(--rule);
    }
    header .inner{
      max-width:var(--page-width);
      margin:0 auto;
      padding:10px 16px;
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:12px;
    }

    .brand{
      font-size:12px;
      color:var(--muted);
      display:flex;
      align-items:baseline;
      gap:10px;
      flex-wrap:wrap;
      min-width:0;
    }
    .home-link{
      font-weight:900;
      letter-spacing:.06em;
      text-transform:uppercase;
      color:var(--ink);
      white-space:nowrap;
      text-decoration:none;
      padding:4px 6px;
      border-radius:8px;
    }
    .home-link:hover{ background:rgba(11,15,20,.05); }
    .home-link:focus-visible{
      outline:none;
      box-shadow:0 0 0 3px var(--focus-ring);
      background:rgba(255,255,255,.78);
    }

    nav.topnav{
      display:flex;
      align-items:center;
      gap:8px;
      margin-left:auto;
      position:relative;
    }
    .series-pill{
      border:1px solid var(--rule);
      background:rgba(255,255,255,.78);
      border-radius:999px;
      font:inherit;
      font-size:12px;
      font-weight:900;
      letter-spacing:.04em;
      text-transform:uppercase;
      padding:6px 10px;
      cursor:pointer;
      color:var(--ink);
      white-space:nowrap;
      -webkit-tap-highlight-color:transparent;
      transition: background .12s ease, border-color .12s ease, transform .12s ease;
    }
    .series-pill:hover{
      background:var(--hover);
      border-color:var(--hover-border);
      transform:translateY(-1px);
    }
    .series-pill:active{ transform:translateY(0); }
    .series-pill[aria-current="true"]{
      border-color:rgba(59,130,246,.40);
      background:rgba(59,130,246,.14);
    }
    .series-pill:focus-visible{
      outline:none;
      box-shadow:0 0 0 3px var(--focus-ring);
    }

    .episodes-panel{
      position:absolute;
      right:0;
      top:calc(100% + 8px);
      width:min(420px, calc(100vw - 24px));
      background:rgba(255,255,255,1);
      backdrop-filter: blur(10px);
      border:1px solid rgba(11,15,20,.14);
      border-radius:14px;
      box-shadow:0 18px 55px rgba(0,0,0,.18);
      overflow:hidden;
      padding:10px;
      z-index:80;
      display:none;
    }
    .episodes-panel[aria-hidden="false"]{ display:block; }

    .episodes-panel .head{
      padding:8px 8px 12px;
      border-bottom:1px solid rgba(11,15,20,.10);
      margin-bottom:10px;
    }
    .panel-series{
      font-weight:900;
      letter-spacing:.12em;
      text-transform:uppercase;
      color:var(--ink);
      font-size:13px;
      display:block;
    }
    .episodes{
      display:grid;
      grid-template-columns:repeat(4, minmax(0,1fr));
      gap:8px;
    }
    .ep{
      display:block;
      text-decoration:none;
      text-align:center;
      padding:10px 8px;
      border-radius:12px;
      border:1px solid rgba(11,15,20,.14);
      background:rgba(255,255,255,.80);
      color:var(--ink);
      font-size:12px;
      font-weight:900;
      letter-spacing:.03em;
      transition: background .12s ease, border-color .12s ease, transform .12s ease, box-shadow .12s ease;
    }
    .ep:hover{
      background:var(--hover);
      border-color:var(--hover-border);
      transform:translateY(-1px);
      box-shadow:0 10px 18px rgba(0,0,0,.08);
    }
    .ep:active{ transform:translateY(0); box-shadow:none; }
    .ep[aria-current="page"]{
      background:rgba(59,130,246,.16);
      border-color:rgba(59,130,246,.55);
    }
    .ep:focus-visible{
      outline:none;
      box-shadow:0 0 0 3px var(--focus-ring);
    }
    .ep .sub{
      display:block;
      margin-top:6px;
      font-weight:700;
      font-size:11px;
      color:var(--muted);
      letter-spacing:0;
      line-height:1.2;
      text-transform:none;
      white-space:normal;
    }
    .ep.is-disabled{
      opacity: .45;
      cursor: default;
      pointer-events: none;
      filter: grayscale(1);
    }


    main{
      max-width:var(--page-width);
      margin:22px auto 40px;
      padding:0 16px 40px;
    }
    .page{
      background:var(--paper);
      border:1px solid var(--rule);
      box-shadow:0 18px 50px rgba(0,0,0,.14);
      border-radius:10px;
      overflow:visible;
    }
    .page-inner{ padding:var(--page-pad); }

    .title{
      text-align:center;
      margin:10px 0 30px;
    }
    .title .series{
      font-size:13px;
      letter-spacing:.20em;
      text-transform:uppercase;
      color:var(--muted);
    }
    .title h1{
      margin:14px 0 10px;
      font-size:28px;
      letter-spacing:.10em;
      text-transform:uppercase;
      font-weight:900;
    }

    .episode-meta{
      margin-top:10px;
      display:flex;
      flex-direction:column;
      gap:8px;
      align-items:center;
      color:var(--muted);
    }
    .episode-meta .broadcast{
      font-size:13px;
      letter-spacing:.10em;
      text-transform:uppercase;
    }
    .episode-meta .tagline{
      max-width: 78ch;
      font-size:14px;
      color:var(--muted);
      line-height:1.45;
    }
    
.episode-desc { margin-top: .75rem; }

.characters { margin-top: 1rem; }
.characters h2 { margin: 0 0 .5rem 0; font-size: 1rem; }

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}

.char-card {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: .75rem;
}

.char-name { font-weight: 700; }
.char-job { opacity: .75; margin-top: .25rem; }
.muted { opacity: .65; }

    
/* Major characters strip (desktop + mobile) */
.characters-strip{
  margin: 6px 0 36px;
  padding: 22px 20px 26px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  width: 100%;
  box-sizing: border-box;
}

.characters-heading{
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.characters-list{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;

  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 22px;
}

.character-card{
  list-style: none !important;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.headshot{
  width: 76px;
  height: 76px;
  border-radius: 10px;
  /*border: 1px solid rgba(11,15,20,.15);*/
  display: block;
  overflow: hidden;
}

/* placeholder only */
.headshot:not(img){
  background: linear-gradient(135deg, #d1d5db, #e5e7eb);
}

/* image behaviour */
img.headshot{
  object-fit: cover;
  background: #e5e7eb; /* in case of transparent PNGs */
}


.character-name{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink);
}

.character-role{
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  max-width: 18ch;
}

.spread{
  display:grid;
  grid-template-columns: minmax(0,2.2fr) minmax(0,1fr);
  gap:var(--gutter);
  align-items:stretch;
}

.script{
  padding-left:var(--left-margin);
  padding-right: calc(var(--marker-lane-desktop) + 6px); /* add 6px */
  border-right:1px solid var(--rule);
  font-size:var(--body-size);
  overflow:visible;
  position:relative;
}

    
.script-wrap{
  min-width:0;
}


/* end of script CTAs */
.script-end{
  grid-column: 1 / -1;         /* span both columns when inside .spread */
  margin-top: 34px;
  padding-top: 22px;
  position: relative;
}


.script-end-actions{
  margin-top: 18px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

/* primary always sits alone */
.script-end-primary{
  justify-self: center;
}

/* secondary: force a tidy 2-up layout (not all in one line) */
.script-end-secondary{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 520px; /* stops it feeling too wide */
  justify-items: stretch;
}


/* primary action */
.script-end-primary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 13px 18px;
  border-radius: 999px;

  background: rgba(11,15,20,.9);
  color: #fff;
  text-decoration: none;

  font-family: var(--mono);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;

  border: 1px solid rgba(11,15,20,.20);
  white-space: nowrap;
}

.script-end-primary:hover{ background: rgba(11,15,20,.82); }
.script-end-primary:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.script-end-primary svg path{
  stroke: currentColor !important;
}
.script-end-primary svg{
  color: currentColor; /* harmless, helps some browsers */
}



/* secondary row */
.script-end-secondary{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.script-end-secondary a{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 999px;

  font-family: var(--mono);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;

  border: 1px solid var(--rule);
  background: rgba(255,255,255,.85);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;

  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.script-end-secondary a:hover{
  background: rgba(59,130,246,.06);
  border-color: rgba(59,130,246,.35);
  transform: translateY(-1px);
}
.script-end-secondary a:active{ transform: translateY(0); }
.script-end-secondary a:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
/* icon (match home CTA styling) */
.script-end-secondary svg{
  width:20px;
  height:20px;
  flex: 0 0 auto;
}
.script-end-secondary svg path{
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* ensure the secondary buttons can hold icon + text neatly */
.script-end-secondary a{
  gap: 10px;
}


/* mobile: make the primary action feel “next up” */
@media (max-width: 900px){
  .script-end-actions{
    justify-items: stretch;
  }

  .script-end-primary{
    width: 100%;
    justify-content: center;
  }

  .script-end-secondary{
    grid-template-columns: 1fr; /* stack on mobile */
    max-width: none;
  }

  .script-end-secondary a{
    width: 100%;
    justify-content: center;
  }
}




/* progress strip (desktop) */
:root{
  --left-rail: 44px; /* progress bar + breathing room */
}
.progress-strip{
  position: fixed;          
  left: 14px;
  top: 100px;               
  z-index: 80;
  width: 14px;
  display:flex;
  justify-content:center;
  opacity:.85;
}

.progress-label{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  top:-18px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: var(--muted);
  user-select:none;
  pointer-events:none;
}


.progress-track{
  position: relative;
  width: 2px;
  height: calc(100vh - (var(--header-height, 64px) + 10px) - 120px);
  background: rgba(11,15,20,.14);
  border-radius: 2px;
  margin: 0 auto;
}

.progress-fill{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  height: 0%;
  background: rgba(59,130,246,.75);     /* more “you are here” */
  border-radius: 2px;
  transition: height .12s linear;
}

.progress-fill::after{
  display:none;
}

.progress-ticks{
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.progress-tick{
  position:absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width:6px;
  height:6px;
  border-radius:999px;
  background: rgba(11,15,20,.22);
  border: 1px solid rgba(11,15,20,.18);
  cursor:pointer;
  padding:0;
  
}

.progress-tick:hover{
  transform: translate(-50%, -50%) scale(1.15);
  border-color: rgba(59,130,246,.55);
  background: rgba(59,130,246,.18);
}

.progress-tick.is-active{
  background: rgba(59,130,246,.95);
  border-color: rgba(59,130,246,.95);
}


.progress-tick:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
@media (max-width: 900px){
  .progress-strip{ display:none; }
}
@media (min-width: 901px){
  .progress-strip{
    position: fixed;
    left: 14px;
    top: calc(var(--header-height, 64px) + 10px);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    transform: translateX(-6px);
  }

  .progress-strip.is-visible{
    opacity: .85;
    pointer-events: auto;
    transform: translateX(0);
  }
}



    

.slug, .action, .dialogue, .transition{ position:relative; }

.slug {
    margin:18px 0 10px;
    font-weight:800;
    text-transform:uppercase;
    scroll-margin-top: 96px;
}

.dialogue{
  margin:0 0 12px;
  scroll-margin-top:96px;

  /* the dialogue “lane” */
  margin-left:var(--dialogue-indent);
  max-width:var(--dialogue-width);
}

/* speaker label */
.dialogue > strong{
  display:block;
  margin-left:calc(var(--char-indent) - var(--dialogue-indent)); /* aligns speaker lane */
  margin-bottom:2px;

  text-transform:uppercase;
  font-weight:800;
}
.parenthetical{
    display:block;
    font-style: italic;   
    opacity: .85;
  margin-left:calc(var(--paren-indent) - var(--dialogue-indent));
  color:var(--muted);
  margin-top:2px;
}

.dialogue{
  white-space:normal;
}
.transition{
  margin:16px 0 12px;
  text-align:right;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
  padding-right:6px;
}

/* =========================
   Mobile
   ========================= */
@media (max-width: 900px){
  .dialogue{
    margin-left:var(--dialogue-indent);
    max-width:var(--dialogue-width);
  }
}


    .notes{ 
        position:relative; 
        font-size:13px; 
        color:var(--ink); 
        padding-top:4px; 

    }

.notes { position: relative; min-width:0; }

#notes-inner{
  position: sticky;
  top: 54px;                 /* below header */
  height: calc(100vh - 70px);
  overflow: hidden;          /* important: sticky container itself shouldn’t scroll */
}

/* the notes list scrolls inside the sticky box */
#notes-card{
  position: relative;        /* no absolute positioning needed */
  left: auto;
  right: auto;
  top: auto;
  max-height: 100%;
  overflow: auto;
  padding-left: 16px;
  padding-right: 2px;
}



.note{
  margin: 0 0 14px;             
  padding: 12px 12px 12px 14px;
  border-left: 3px solid rgba(59,130,246,.35);
  background: rgba(11,15,20,.03);
  border-radius: 10px;
  border: 1px solid rgba(11,15,20,.08);
  cursor: text;      
  user-select: text; 
}

.note .note-top{
  display:flex !important;
  align-items:center;
  justify-content:space-between !important;
  gap:12px;
  width:100%;
}
.note .note-copy{
  margin-right:auto;
}

.copy-icon{
  display:inline-block;
  opacity:.55; /* keeps it subtle */
}

.note-copy{
  display:inline-flex;
  align-items:center;
  gap:6px;

  font-family:var(--mono);
  font-size:11px;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;

  color:rgba(11,15,20,.45);
  background:none;
  border:none;
  padding:0;
  cursor:pointer;
}

.note-copy:hover{
  color:rgba(11,15,20,.55); /* tiny change only */
}

.note-copy:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px var(--focus-ring);
  border-radius:6px;
}

.note-copy .clip{
  opacity:.45;
  font-size:12px;
  line-height:1;
}


/* X of Y indicator */
.note-count{
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  white-space:nowrap;
}


.note-actions, .note-nav{ user-select: none; } /


/* actions row (jump + copy) */
.note-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* make them small “pills” like your nav buttons */
.note-action{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  text-decoration: none;         /* removes the dotted underline */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.note-action:hover{
  background: rgba(59,130,246,.06);
  border-color: rgba(59,130,246,.35);
  transform: translateY(-1px);
}
.note-action:active{ transform: translateY(0); }
.note-action:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.note p{ line-height: 1.5; }

.note .jump{ margin-top: 12px; }

a.anchor{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(11,15,20,.12);
  background: rgba(255,255,255,.8);
  text-decoration:none;
  border-bottom:none;
}

a.anchor:hover{
  background: rgba(59,130,246,.06);
  border-color: rgba(59,130,246,.35);
}


    .note-open{
      background: var(--anno-soft);
      border-radius:12px;
      box-shadow: 0 0 0 6px var(--anno-soft);
    }

    .has-note{ position:relative; }
    .note-marker{
      position:absolute;
      top: 2px;
      right: calc(-1 * (var(--marker-size) + 25px));
      width:var(--marker-size);
      height:var(--marker-size);
      border:1px solid rgba(59,130,246,.35);
      background:rgba(255,255,255,.92);
      border-radius:999px;
      box-shadow:0 8px 18px rgba(0,0,0,.10);
      cursor:pointer;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      padding:0;
      -webkit-tap-highlight-color:transparent;
      z-index:5;
      transition: transform .12s ease, background .12s ease, border-color .12s ease;
    }
    .note-marker:hover{
      background:rgba(59,130,246,.08);
      border-color:rgba(59,130,246,.65);
      transform:translateY(-1px);
    }
    .note-marker:active{ transform:translateY(0); }
    .note-marker:focus-visible{
      outline:none;
      box-shadow:0 8px 18px rgba(0,0,0,.12), 0 0 0 3px var(--focus-ring);
    }
    .note-marker svg{ width:16px; height:16px; }
    .note-marker .pencil{
      fill:none;
      stroke:var(--anno);
      stroke-width:2.2;
      stroke-linecap:round;
      stroke-linejoin:round;
    }

    .mobile-notes{ display:none; }
    .notes-backdrop{
      position:fixed; inset:0;
      background:rgba(0,0,0,.28);
      z-index:55;
      opacity:0;
      pointer-events:none;
      transition:opacity .18s ease;
    }
    .notes-sheet{
      position:fixed;
      left:0; right:0; bottom:0;
      z-index:56;
      max-height:78vh;
      transform:translateY(100%);
      transition:transform .22s ease;
      background:rgba(255,255,255,1);
      backdrop-filter: blur(10px);
      box-shadow:0 -18px 50px rgba(0,0,0,.18);
      border-top:1px solid var(--rule);
      border-radius:16px 16px 0 0;
      overflow:hidden;
      display:grid;
      grid-template-rows:auto 1fr;
      touch-action:none;
    }
    /* note navigation + x of y */
.note-top{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-bottom:8px;
}

.note-count{
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}

.note-nav{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
}

.note-nav button{
  font-family:var(--mono);
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--rule);
  background:rgba(255,255,255,.9);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.note-nav button:hover{
  background:rgba(59,130,246,.06);
  border-color:rgba(59,130,246,.35);
  transform:translateY(-1px);
}
.note-nav button:active{ transform:translateY(0); }

.note-nav button:disabled{
  opacity:.45;
  cursor:default;
  transform:none;
}

    
    .handle{ width:42px; height:4px; border-radius:999px; background:rgba(11,15,20,.25); margin:8px auto 6px; }
    .sheet-head{
      display:flex; align-items:center; justify-content:flex-end;
      gap:10px; padding:8px 12px 10px;
      border-bottom:1px solid var(--rule);
      background:rgba(255,255,255,.8);
    }
    .sheet-close{
      font-family:var(--mono);
      font-weight:900;
      font-size:12px;
      letter-spacing:.06em;
      text-transform:uppercase;
      border:1px solid var(--rule);
      background:rgba(255,255,255,.85);
      border-radius:999px;
      padding:6px 10px;
      cursor:pointer;
    }
    .sheet-body{ overflow:auto; padding:12px 12px 18px; touch-action: pan-y; }
    .sheet-body .note{ background:rgba(255,255,255,.9); }

    body.notes-open{ overflow:hidden; }
    body.notes-open .notes-backdrop{ opacity:1; pointer-events:auto; }
    body.notes-open .notes-sheet{ transform:translateY(0); }

    footer.site-footer{
      border-top:1px solid var(--rule);
      background:rgba(243,244,246,.92);
      backdrop-filter: blur(8px);
    }
    .footer-inner{
      max-width:var(--page-width);
      margin:0 auto;
      padding:16px 16px 22px;
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:14px;
      color:var(--muted);
      font-size:12px;
    }
    .footer-inner a{
      color:inherit;
      text-decoration:none;
      border-bottom:1px dotted rgba(11,15,20,.35);
    }
    .footer-inner a:hover{
      color:var(--ink);
      border-bottom-color:rgba(59,130,246,.55);
    }
    .footer-right{ text-align:right; }

@media (max-width: 900px){
      body{ background:#fff; }
      main{ max-width:none; margin:0; padding:0; }
      .page{ border:none; border-radius:0; box-shadow:none; }
      .page-inner{ padding:18px 14px 26px; }

      .back-to-top{
        right: 14px;
    
        bottom: max(92px, calc((100vh - var(--sheet-top, 100vh)) + 16px));
      }


      header .inner{
        max-width:none;
        padding:10px 12px;
        flex-direction:column;
        align-items:stretch;
        gap:10px;
      }
      .brand{ justify-content:space-between; align-items:center; }

      nav.topnav{
        margin-left:0;
        gap:8px;
        overflow-x:auto;
        overflow-y:visible;
        padding:2px 2px 8px;
        scroll-snap-type:x mandatory;
        -webkit-overflow-scrolling:touch;
      }

      .episodes-panel{
        position:fixed;
        left:12px;
        right:12px;
        top:120px;
        width:auto;
        max-height:min(60vh, 520px);
        overflow:auto;
        z-index:90;
      }
      .episodes{ grid-template-columns:repeat(2, minmax(0,1fr)); }

      .spread{ grid-template-columns:1fr; }
      .script{
        border-right:none;
        padding-left:12px;
        padding-right: var(--marker-safe);
      }

      :root{
        --char-indent:150px;
        --paren-indent:95px;
        --dialogue-indent:95px;
        --dialogue-width:100%;
      }

      .note-marker{
        position:fixed;
        right: var(--marker-gap);
        top: 120px;
        z-index:20;
        opacity:1;
        transition: opacity .12s ease;
      }
      .note-marker.is-hidden{ opacity:0; pointer-events:none; }

      .notes{ display:none; }
      .mobile-notes{ display:block; }
      #mobile-notes-list { overflow-y: auto; }
      
      .note { border-radius: 0px; }
      

  #notes-close-btn{
    border: none;
    background: none;
    padding: 6px;
    margin-left: auto;

    font-size: 20px;
    line-height: 1;
    font-weight: 700;

    color: rgba(11,15,20,.45);
    cursor: pointer;

    border-radius: 6px;
    transition: color .12s ease;
  }

  #notes-close-btn:hover{
    color: rgba(11,15,20,.65);
  }

  #notes-close-btn:active{
    color: rgba(11,15,20,.75);
  }

  #notes-close-btn:focus-visible{
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }


      
      .title h1{ font-size:26px; }
      .episode-meta .tagline{ max-width: 52ch; }

      footer.site-footer{ background:#fff; }
      .footer-inner{
        max-width:none;
        padding:16px 12px 22px;
        flex-direction:column;
        align-items:flex-start;
        text-align:left;
      }
      .footer-right{ text-align:left; }
}
    

/* home page CTA buttons */
.home-cta{
  display:flex;
  justify-content:center;
  gap:12px;
  margin: 18px 0 18px 0;
  flex-wrap:wrap;
}

.home-cta-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding: 13px 18px;
  border-radius: 999px;

  background: #0b0f14;
  color: #fff;
  text-decoration:none;

  font-weight: 900;
  font-size: 14px;
  letter-spacing: .01em;
}

.home-cta-btn:hover{ opacity:.92; }
.home-cta-btn:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px var(--focus-ring);
}
.home-cta-btn.is-disabled{
  opacity:.6;
  cursor:not-allowed;
}


/* icon */
.home-cta-btn svg{
  width:20px;
  height:20px;
  flex: 0 0 auto;
}
.home-cta-btn svg path{
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}



/* home page episode index – simple, editorial */

.home-series{
  margin: 32px 0 40px;
}

.home-series-title{
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* grid */
.home-ep-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

/* episode row */
.home-ep-card{
  display: block;
  padding: 16px 16px 15px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #f9fafb;
  transition: background .12s ease, border-color .12s ease;
}

.home-ep-meta{
  margin-top: 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  color: var(--muted);
  font-size: 12px;
}



.home-ep-status{
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255,255,255,.7);
}
/* status row */
.ep-row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}

.ep-status{
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: var(--muted);
  opacity:.8;
  white-space:nowrap;
}

/* disabled (Unavailable) cards */
.home-ep-card.is-disabled{
  opacity: .55;
  filter: grayscale(15%);
  cursor: default;
}

.home-ep-card.is-disabled:hover{
  background: #f9fafb;   /* no hover “lift” */
  border-color: var(--rule);
}

.ep-meta-row{
  margin-top:6px;
  display:flex;
  align-items:center;
  justify-content:space-between; /* notes left, pill right */
  font-size: 12px;
  gap:10px;
}

.ep-notes{
  font-size:12px;
  color:var(--muted);
  opacity:.75;
}

.ep-title{
  font-weight: 900;
  letter-spacing: .04em;
  font-size: 15px;
  margin-bottom: 6px;
}

.ep-status-pill{
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--rule);
  background:rgba(255,255,255,.7);
  color:var(--muted);
  white-space:nowrap;
}
.home-ep-card.is-disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* label */
.ep-label{
  font-weight: 800;
  letter-spacing: .04em;
  font-size: 13px;
}

/* subtitle */
.ep-sub{
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  max-width: 44ch;
}

/* small screens */
@media (max-width: 520px){
  .home-ep-grid{
    grid-template-columns: 1fr;
  }
}

.home-series{
  margin: 36px 0 42px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.home-series:first-child{
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* home page intro */

.home-hero{
  text-align: center;
  margin: 40px auto 20px;
  max-width: 64ch;
}

.home-title{
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-lede{
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 58ch;
}




.back-to-top{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;

  padding: 10px 14px;
  border-radius: 999px;

  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;

  background: rgba(11,15,20,.9);
  color: #fff;
  border: none;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity .18s ease,
    transform .18s ease,
    background .12s ease;
}

.back-to-top:hover{
  background: rgba(11,15,20,.8);
}

.back-to-top:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.back-to-top.is-visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* Back to top button */
#back-to-top{
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 120;
}

/* Mobile: lift button above notes drawer */
@media (max-width: 900px){
  :root{
    --mobile-sheet-height: 0px;
  }

  #back-to-top{
    bottom: calc(
      var(--mobile-sheet-height)
      + 16px
      + env(safe-area-inset-bottom, 0px)
    );
  }
}

/* back to top */
#back-to-top{
  width: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (min-width: 901px){
  :root{
    --rail-left: 14px;      /* move the whole rail away from the edge */
    --rail-width: 24px;     /* give it enough width to truly centre circles/line */
    --rail-center: calc(var(--rail-left) + (var(--rail-width) / 2));
  }

  .progress-strip{
    left: var(--rail-left);
    width: var(--rail-width);

    /* make centring deterministic */
    display: flex;
    flex-direction: column;
    align-items: center;    /* centres the track */
    justify-content: flex-start;
  }

  .progress-track{
    margin: 0;              /* stop margin:auto games */
  }

  /* ticks: centre relative to the strip (not a pixel value) */
  .progress-tick{
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .progress-tick:hover{
    transform: translate(-50%, -50%) scale(1.15);
  }

  /* back to top: centre on the same rail centre and stop stretching */
  #back-to-top{
    left: var(--rail-center);
    right: auto !important;
    width: auto !important;
    bottom: 24px !important;
    transform: translateX(-50%);
  }
}
