/* ==========================================================================
   Stage Sprint — Podcast Booking Tracker
   Brand tokens sourced from podcastchallenge.lauriemabelis.com:
   Navy #000321 · Orange #ff6c00 · CTA #ff6240 · Muted #607179 · Grey #727171
   Type: Sora (headings) · Montserrat (labels, CTAs) · Inter (body)
   ========================================================================== */

:root{
  /* Ground · lifted from podcastchallenge.lauriemabelis.com */
  --navy: #000321;
  --navy-soft: #0d1029;
  --paper: #000321;
  --paper-raised: #0d1029;
  --surface-raised: #161b3a;

  /* Ink */
  --ink: #ffffff;
  --grey: #8996a0;
  --grey-soft: #607179;

  /* White tints, the dark-ground equivalent of the old navy washes */
  --tint-04: rgba(255,255,255,0.035);
  --tint-08: rgba(255,255,255,0.07);
  --tint-12: rgba(255,255,255,0.12);

  --orange: #ff6c00;
  --orange-dark: #e55f00;
  --orange-lift: #ff9147;   /* orange that still reads as text on navy */
  --cta: #ff6240;
  --cta-gradient: linear-gradient(135deg, #ff6c00 0%, #ff6240 100%);
  --orange-tint-10: rgba(255,108,0,0.10);
  --orange-tint-18: rgba(255,108,0,0.18);

  --line: rgba(255,108,0,0.14);
  --line-strong: rgba(255,255,255,0.18);

  --good: #3ddc97;
  --good-tint: rgba(61,220,151,0.14);
  --wait: #8996a0;
  --wait-tint: rgba(255,255,255,0.06);

  --font-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-label: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.35), 0 10px 30px rgba(0,0,0,0.35);
  --shadow-pop: 0 4px 14px rgba(0,0,0,0.45), 0 18px 44px rgba(0,0,0,0.5);
}


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

body{
  margin:0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{ font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }

button{ font-family: inherit; }

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

.app-header{
  background: var(--navy);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner{
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-lockup{
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark svg{ display:block; }

.brand-text{ display: flex; flex-direction: column; line-height: 1.15; }

.brand-name{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.beta-chip{
  font-family: var(--font-label);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: var(--orange);
  color: var(--navy);
  padding: 2px 7px;
  border-radius: 100px;
}

.brand-sub{
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}

.save-indicator{
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.06);
  padding: 6px 12px;
  border-radius: 100px;
  transition: background 0.25s ease, color 0.25s ease;
}

.save-indicator.just-saved{
  background: var(--orange-tint-18);
  color: #ffd8b8;
}

.save-dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.save-indicator.just-saved .save-dot{ background: var(--orange); }

/* ----------------------------------- Main -------------------------------- */

.app-main{
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.page-head{ margin-bottom: 22px; }

.page-head h1{
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.1;
}

.page-sub{
  margin: 8px 0 0;
  color: var(--grey);
  font-size: 15px;
  max-width: 780px;
}

/* ------------------------------- Phase nav ------------------------------- */

.phase-nav{
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.phase-tab{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px 12px;
  cursor: pointer;
  color: var(--grey);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.phase-tab:hover:not(.phase-tab-disabled){ color: var(--ink); }

.phase-tab .phase-num{
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.phase-tab .phase-label{
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: inherit;
}

.phase-tab.active{
  color: var(--ink);
  border-bottom-color: var(--orange);
}

.phase-tab-disabled{
  cursor: default;
  opacity: 0.45;
}

.phase-tab-disabled .phase-label em{ font-style: normal; font-weight: 400; }

/* --------------------------------- Toolbar -------------------------------- */

.toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar-hint{
  margin: 0;
  color: var(--grey);
  font-size: 13.5px;
  max-width: 640px;
}

.toolbar-count{
  font-size: 12.5px;
  color: var(--grey-soft);
  font-weight: 500;
}

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

.btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--surface-raised);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-primary:hover{ background: #1e2450; border-color: rgba(255,255,255,0.3); }

/* Hero CTA · the pill treatment used across podcastchallenge.lauriemabelis.com */
.btn-cta{
  background: var(--cta-gradient);
  color: var(--navy);
  border-radius: 100px;
  padding: 12px 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(255,108,0,0.28);
}
.btn-cta:hover{ box-shadow: 0 6px 20px rgba(255,108,0,0.38); }

.btn-plus{ font-size: 15px; line-height: 1; font-weight: 700; }

.btn-secondary{
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover{ border-color: var(--orange); color: var(--orange); }

.btn-accent{
  background: var(--orange);
  color: var(--navy);
}
.btn-accent:hover{ background: var(--orange-dark); }

.btn-ghost{
  background: transparent;
  color: var(--grey);
  border-color: var(--line);
}
.btn-ghost:hover{ color: var(--ink); border-color: var(--line-strong); }

.btn-small{
  padding: 7px 12px;
  font-size: 12.5px;
}

/* Booked checkbox — a real checkbox, not a button, so the action reads as
   "check this off" rather than an ambiguous click target. */

.booked-checkbox{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  user-select: none;
}

.booked-checkbox input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 21px;
  height: 21px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-raised);
  cursor: pointer;
  display: grid;
  place-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.booked-checkbox input[type="checkbox"]:hover{ border-color: var(--good); }

.booked-checkbox input[type="checkbox"]::before{
  content: "";
  width: 12px;
  height: 12px;
  transform: scale(0);
  transition: transform 0.12s ease;
  background: var(--navy);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 45% 62%);
}

.booked-checkbox input[type="checkbox"]:checked{
  background: var(--good);
  border-color: var(--good);
}

.booked-checkbox input[type="checkbox"]:checked::before{
  transform: scale(1);
}

/* ---------------------------------- Table --------------------------------- */

.table-scroll{
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-card);
  -webkit-overflow-scrolling: touch;
}

.tracker-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

.tracker-table thead th{
  text-align: left;
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--grey);
  background: var(--tint-04);
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}

.tracker-table tbody tr{
  border-bottom: 1px solid var(--line);
}

.tracker-table tbody tr:last-child{ border-bottom: none; }

.tracker-table tbody tr:hover{ background: var(--tint-04); }

.tracker-table td{
  padding: 14px 16px;
  vertical-align: top;
  font-size: 14px;
}

.col-status{ width: 190px; }
.col-name{ width: 200px; }
.col-date{ width: 150px; }
.col-link{ width: 200px; }
.col-notes{ width: 320px; }
.col-prep{ width: 290px; }
.col-booked{ width: 140px; text-align: center; }

/* Status cell */

.status-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 100px;
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.status-empty{ background: var(--tint-08); color: var(--grey); }
.status-pill.status-wait{ background: var(--wait-tint); color: var(--ink); }
.status-pill.status-followup{ background: var(--orange-tint-18); color: var(--orange-lift); }
.status-pill.status-booked{ background: var(--good-tint); color: var(--good); }

.status-sub{
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: var(--grey);
  line-height: 1.4;
}

.status-sub strong{ color: var(--ink); font-weight: 600; }

/* Inputs inside cells */

.cell-input, .cell-textarea{
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cell-input:hover, .cell-textarea:hover{ background: var(--tint-04); }
.cell-input:focus, .cell-textarea:focus{
  outline: none;
  border-color: var(--orange);
  background: var(--surface-raised);
}

.name-input{
  font-weight: 600;
  font-size: 14.5px;
}

.cell-textarea{ resize: vertical; min-height: 40px; }

input[type="date"].cell-input{
  font-size: 13.5px;
  color: var(--ink);
}

/* color-scheme: dark already lightens the picker glyph, so no invert here.
   It just needs to stop being near-invisible. */
input[type="date"]::-webkit-calendar-picker-indicator{
  opacity: 0.55;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover{ opacity: 1; }

.cell-input::placeholder, .cell-textarea::placeholder,
.inline-label input::placeholder, .inline-label textarea::placeholder{
  color: var(--grey-soft);
}

/* A pasted link is still a text field you can edit, with a shortcut out to it. */

.col-link{ position: relative; }

.cell-link-open{
  display: block;
  width: fit-content;
  margin: 5px 0 0;
  font-family: var(--font-label);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cell-link-open:hover{ color: var(--orange-lift); text-decoration: underline; }
.cell-link-open:focus-visible{ outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* Notes + history cell */

.notes-cell{ min-width: 300px; }

.general-note{
  margin-bottom: 10px;
}

.history-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 10px;
}

.history-list.is-expanded{ max-height: none; overflow: visible; }

.history-entry{
  background: var(--tint-04);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12.5px;
}

.history-entry-head{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-right: 8px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.history-tag{
  white-space: nowrap;
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 100px;
}

.history-tag.tag-outreach{ background: var(--tint-12); color: var(--ink); }
.history-tag.tag-followup{ background: var(--orange-tint-18); color: var(--orange-lift); }
.history-tag.tag-update{ background: var(--good-tint); color: var(--good); }

.history-note{ color: var(--grey); line-height: 1.45; white-space: pre-wrap; }

.history-empty{
  font-size: 12.5px;
  color: var(--grey-soft);
  font-style: italic;
  padding: 4px 2px 8px;
}

.notes-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Inline forms (add update / follow up) */

.inline-form{
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-label{
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.inline-label input, .inline-label textarea{
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
  background: var(--navy);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  resize: vertical;
}

.inline-label input:focus, .inline-label textarea:focus{
  outline: none;
  border-color: var(--orange);
}

.inline-form-actions{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 2px;
}

/* Booked cell */

.booked-cell{ text-align: center; }

.remove-row-btn{
  display: block;
  margin: 8px auto 0;
  font-size: 11px;
  color: var(--grey-soft);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.remove-row-btn:hover{ color: #ff8080; }

/* ------------------------------ Empty state ------------------------------- */

.empty-state{
  text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
}

.empty-title{
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.empty-sub{
  color: var(--grey);
  font-size: 14px;
  margin: 0 0 18px;
}

/* ------------------------------- Backup panel ------------------------------ */

.backup-panel{
  margin-top: 36px;
  padding: 22px 24px;
  background: var(--tint-04);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.backup-copy h2{
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.backup-copy p{
  margin: 0;
  font-size: 13px;
  color: var(--grey);
  max-width: 520px;
  line-height: 1.5;
}

.backup-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.app-footer{
  text-align: center;
  padding: 20px;
  color: var(--grey-soft);
  font-size: 12px;
}

/* ----------------------------------- Toast --------------------------------- */

.toast{
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}

.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.toast-error{ background: #7a1f1f; }

/* ---------------------------------- Mobile --------------------------------- */

/* ------------------- Prep + leverage checklists (Phase 2 / 3) --------------- */

.checklist{ margin-bottom: 10px; }

.checklist-progress{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  margin-bottom: 8px;
  border-radius: 100px;
  background: var(--tint-08);
  color: var(--grey);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.checklist-progress.is-complete{
  background: var(--good-tint);
  color: var(--good);
}

.checklist-items{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checklist-item{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 3px 4px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.checklist-item:hover{ background: var(--tint-04); }

.checklist-item input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  margin: 1px 0 0;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-raised);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checklist-item input[type="checkbox"]:hover{ border-color: var(--good); }

.checklist-item input[type="checkbox"]::before{
  content: "";
  width: 9px;
  height: 9px;
  transform: scale(0);
  transition: transform 0.12s ease;
  background: var(--navy);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 45% 62%);
}

.checklist-item input[type="checkbox"]:checked{
  background: var(--good);
  border-color: var(--good);
}

.checklist-item input[type="checkbox"]:checked::before{ transform: scale(1); }
.checklist-item input[type="checkbox"]:focus-visible{ outline: 2px solid var(--orange); outline-offset: 2px; }

/* Ticked items step back so the eye lands on what is still outstanding. */
.checklist-item input[type="checkbox"]:checked + span{
  color: var(--grey);
  text-decoration: line-through;
  text-decoration-color: var(--grey-soft);
}

/* The live flag sits with the episode link it describes. */
.flag-live{
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Phase 2 and 3 stack two or three controls in the status column. */
/* Two or three stacked controls, centred as a block rather than sitting side
   by side and wrapping mid-label. */
.booked-cell .booked-checkbox{
  display: flex;
  width: fit-content;
  margin: 0 auto;
}
.booked-cell .booked-checkbox + .booked-checkbox{ margin-top: 9px; }

/* ------------------------- Filter + sort bar (Phase 1) --------------------- */

.filter-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-chips{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--grey);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip:hover{ color: var(--ink); border-color: rgba(255,255,255,0.32); }

.chip-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  height: 20px;
  border-radius: 100px;
  background: var(--tint-08);
  color: inherit;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.chip.is-active{
  color: var(--ink);
  border-color: var(--orange);
  background: var(--orange-tint-10);
}
.chip.is-active .chip-count{ background: var(--orange); color: var(--navy); }

/* Anything actually waiting on you reads orange even when it isn't selected. */
.chip-urgent.has-items{ color: var(--orange-lift); border-color: rgba(255,108,0,0.45); }
.chip-urgent.has-items .chip-count{ background: var(--orange-tint-18); color: var(--orange-lift); }
.chip-urgent.has-items.is-active .chip-count{ background: var(--orange); color: var(--navy); }

.sort-control{
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.sort-label{
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--grey-soft);
}

.sort-control select{
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 34px 8px 12px;
  cursor: pointer;
  /* caret drawn inline so nothing has to load from the network */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238996a0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
}

.sort-control select:hover{ border-color: rgba(255,255,255,0.3); }
.sort-control select:focus{ outline: none; border-color: var(--orange); }

/* Filter matched nothing, which is different from having no podcasts at all. */

.filter-empty{
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
}

.filter-empty-title{
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.filter-empty-sub{
  color: var(--grey);
  font-size: 13.5px;
  margin: 0 0 16px;
}

/* --------------------- Editing a conversation entry ----------------------- */

.history-item{ display: flex; flex-direction: column; }

.history-entry{ position: relative; }

.history-entry-actions{
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 100px;
  background: var(--surface-raised);
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
  transition: opacity 0.15s ease;
}

.icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--grey);
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover{ color: var(--ink); background: var(--tint-08); border-color: var(--line-strong); }
.icon-btn-danger:hover{ color: #ff8080; background: rgba(255,90,90,0.12); border-color: rgba(255,90,90,0.4); }
.icon-btn:focus-visible{ outline: 2px solid var(--orange); outline-offset: 1px; }

/* Idle-hidden only where there is a real pointer. On touch they stay put,
   because there is no hover to reveal them with. */
@media (hover: hover){
  .history-entry-actions{ opacity: 0; }
  .history-entry:hover .history-entry-actions,
  .history-entry:focus-within .history-entry-actions{ opacity: 1; }
}

/* Touch devices have no hover to reveal them, so the buttons are always there
   and the entry header has to leave room rather than sit underneath. */
@media (hover: none){
  .history-entry-head{ padding-right: 60px; }
}

.history-entry.is-editing{
  border: 1px solid var(--orange);
  background: var(--orange-tint-10);
}

.history-edit-slot:not(:empty){ margin-top: 6px; }

.inline-hint{
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--grey);
}

/* ------------------------------ Toast action ------------------------------ */

.toast-text{ text-align: left; }

.toast-action{
  pointer-events: auto;
  flex-shrink: 0;
  border: 1px solid var(--orange);
  background: var(--orange-tint-18);
  color: var(--orange-lift);
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.toast-action:hover{ background: var(--orange); color: var(--navy); }

@media (max-width: 720px){
  .app-header{ padding: 12px 16px; }
  .app-main{ padding: 20px 14px 48px; }
  .backup-panel{ flex-direction: column; align-items: flex-start; }
  .backup-actions{ width: 100%; }
  .backup-actions .btn{ flex: 1; justify-content: center; }
  .toolbar{ flex-direction: column; align-items: flex-start; }
  .btn{ min-height: 40px; }
  .filter-bar{ flex-direction: column; align-items: stretch; gap: 12px; }
  .filter-chips{ overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .sort-control{ justify-content: space-between; }
  .sort-control select{ flex: 1; }
  .icon-btn{ padding: 5px 10px; }
}
