/* Upper Room Podcast portal.
   Written for a dyslexic reader first: Atkinson Hyperlegible, large text,
   off-white background, short lines, left aligned, generous spacing,
   one task per screen, big plain buttons. Colours from the show artwork. */

:root {
  --navy: #023047;
  --navy-2: #0b4463;
  --sky: #8ecae6;
  --sky-soft: #e4f2f9;
  --amber: #ffb703;
  --amber-soft: #fff4d6;
  --bg: #fbf8f1;
  --card: #ffffff;
  --text: #1d2730;
  --muted: #55626d;
  --line: #e3ded2;
  --ok: #1e7b4b;
  --ok-soft: #e5f4ec;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { font-size: 20px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0.01em;
  word-spacing: 0.06em;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem 4rem; }

header.top {
  background: var(--navy);
  color: #fff;
}
header.top .wrap {
  display: flex; align-items: center; gap: 0.8rem;
  padding-top: 0.7rem; padding-bottom: 0.7rem;
}
header.top img { width: 2.6rem; height: 2.6rem; }
header.top .name { font-weight: 700; font-size: 1.05rem; flex: 1; }
header.top .wrap { flex-wrap: wrap; max-width: 60rem; }
nav.menu { display: flex; gap: 0.3rem; flex-wrap: wrap; order: 3; width: 100%; }
nav.menu a {
  color: #fff; text-decoration: none; padding: 0.35rem 0.9rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 700; border: 2px solid transparent;
}
nav.menu a:hover { border-color: var(--sky); }
nav.menu a[aria-current="page"] { background: var(--sky); color: var(--navy); }
@media (min-width: 760px) { nav.menu { order: 0; width: auto; } }
header.top a { color: #fff; text-decoration: none; }
header.top form { margin: 0; }
header.top button {
  background: transparent; color: #fff; border: 2px solid var(--sky);
  border-radius: 999px; padding: 0.25rem 0.9rem; font: inherit; font-size: 0.85rem;
  cursor: pointer; min-height: 0;
}

h1 { font-size: 1.6rem; line-height: 1.25; margin: 2rem 0 0.6rem; color: var(--navy); }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 1.6rem 0 0.5rem; color: var(--navy); }
p { margin: 0.5rem 0 1rem; max-width: 38rem; }
.lead { font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

a { color: var(--navy-2); text-underline-offset: 0.15em; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin: 1rem 0;
}

/* Buttons: big, plain words, obvious. */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.6rem 1.4rem;
  font: inherit; font-weight: 700; font-size: 1rem;
  border-radius: 14px; border: 2px solid var(--navy);
  background: var(--navy); color: #fff; cursor: pointer; text-decoration: none;
}
.btn:hover, button:hover { background: var(--navy-2); }
.btn.secondary, button.secondary { background: #fff; color: var(--navy); }
.btn.secondary:hover, button.secondary:hover { background: var(--sky-soft); }
.btn.big, button.big { min-height: 3.6rem; font-size: 1.15rem; padding: 0.8rem 2rem; width: 100%; }
.btn.publish, button.publish { background: var(--amber); border-color: var(--amber); color: var(--navy); }
.btn.publish:hover, button.publish:hover { background: #ffc53a; }
.btn.small, button.small { min-height: 2.3rem; padding: 0.3rem 0.8rem; font-size: 0.85rem; border-radius: 10px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

:focus-visible { outline: 4px solid var(--amber); outline-offset: 3px; }

.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

/* Forms */
label { display: block; font-weight: 700; margin: 1rem 0 0.3rem; }
input[type=text], input[type=password], input[type=search], input[type=number], textarea {
  width: 100%; font: inherit; color: var(--text);
  background: #fff; border: 2px solid #b9c3cb; border-radius: 12px;
  padding: 0.6rem 0.8rem; line-height: 1.5;
}
input:focus, textarea:focus { border-color: var(--navy); }
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 0.7rem; font-weight: 400; margin: 0.6rem 0; }
.check input { width: 1.5rem; height: 1.5rem; margin-top: 0.2rem; flex: none; accent-color: var(--navy); }

/* Notices: rounded box, thin neutral border, small icon. */
.notice {
  display: flex; gap: 0.7rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 14px;
  background: #fff; padding: 0.8rem 1rem; margin: 1rem 0;
}
.notice .icon { flex: none; font-size: 1.2rem; line-height: 1.4; }
.notice.bad { background: var(--bad-soft); border-color: #f3c3bd; }
.notice.ok { background: var(--ok-soft); border-color: #bfe3cf; }
.notice.warn { background: var(--amber-soft); border-color: #f5dd9a; }

/* Status pills */
.pill {
  display: inline-block; border-radius: 999px; padding: 0.1rem 0.7rem;
  font-size: 0.8rem; font-weight: 700; background: var(--sky-soft); color: var(--navy);
}
.pill.published { background: var(--ok-soft); color: var(--ok); }
.pill.failed { background: var(--bad-soft); color: var(--bad); }
.pill.ready { background: var(--amber-soft); color: #7a5600; }

/* Episode list */
.episode { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: inherit; }
.episode .title { font-weight: 700; font-size: 1.05rem; }
.episode .when { color: var(--muted); font-size: 0.85rem; }
.episode:hover .title { text-decoration: underline; }

/* Step lists (progress) */
ol.steps { list-style: none; padding: 0; margin: 1rem 0; }
ol.steps li {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line);
}
ol.steps .mark {
  flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; background: var(--line); color: var(--muted);
}
ol.steps li.running .mark { background: var(--amber); color: var(--navy); }
ol.steps li.done .mark { background: var(--ok); color: #fff; }
ol.steps li.failed .mark { background: var(--bad); color: #fff; }
ol.steps .detail { color: var(--muted); font-size: 0.85rem; }

/* Read-aloud and voice buttons sit next to what they act on. */
.tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }

/* Thumbnail picker */
.stills { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.8rem; }
.stills label { margin: 0; font-weight: 400; cursor: pointer; }
.stills input { position: absolute; opacity: 0; }
.stills img { width: 100%; border-radius: 10px; border: 4px solid transparent; display: block; }
.stills input:checked + img { border-color: var(--amber); }
.stills input:focus-visible + img { outline: 4px solid var(--navy); }
img.preview { width: 100%; border-radius: 12px; border: 1px solid var(--line); }

.corrections .fix { border-bottom: 1px solid var(--line); }
.corrections .fix:last-child { border-bottom: 0; }
.corrections .from { text-decoration: line-through; color: var(--bad); }
.corrections .to { font-weight: 700; color: var(--ok); }

.test-banner {
  background: var(--amber); color: var(--navy); text-align: center;
  font-weight: 700; padding: 0.3rem 1rem; font-size: 0.85rem;
}

@media (max-width: 520px) {
  html { font-size: 18px; }
  .card { padding: 1rem; }
}

/* All episodes */
.wrap.wide { max-width: 60rem; }
.ep-card { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; align-items: start;
           text-decoration: none; color: inherit; }
.ep-card img, .ep-card .nothumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
           border-radius: 10px; background: var(--sky-soft); display: block; }
.ep-card:hover .ep-title { text-decoration: underline; }
.ep-num { display: inline-block; font-weight: 700; font-size: 0.8rem; color: var(--navy);
          background: var(--amber-soft); border-radius: 999px; padding: 0.05rem 0.6rem; }
.ep-title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; margin: 0.25rem 0; }
.ep-meta { color: var(--muted); font-size: 0.9rem; }
.where { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.where span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem;
              font-weight: 700; border-radius: 999px; padding: 0.15rem 0.7rem 0.15rem 0.4rem;
              background: var(--ok-soft); color: var(--ok); }
.where span.missing { background: #eef0f2; color: var(--muted); }
.where span.pending { background: var(--amber-soft); color: #7a5600; }
.where svg { width: 1.2rem; height: 1.2rem; flex: none; }
.where span.missing svg { filter: grayscale(1); opacity: 0.6; }
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 1rem 0; }
.tabs a { padding: 0.3rem 0.9rem; border-radius: 999px; border: 2px solid var(--navy);
          text-decoration: none; color: var(--navy); font-weight: 700; font-size: 0.9rem; }
.tabs a[aria-current="page"] { background: var(--navy); color: #fff; }
ul.checks { list-style: none; padding: 0; margin: 0.5rem 0; }
ul.checks li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.3rem 0; }
ul.checks .mark { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
                  display: inline-flex; align-items: center; justify-content: center;
                  font-size: 0.8rem; font-weight: 700; }
ul.checks .ok .mark { background: var(--ok); color: #fff; }
ul.checks .warn .mark { background: var(--amber); color: var(--navy); }
ul.checks .bad .mark { background: var(--bad); color: #fff; }
.stored { white-space: pre-line; background: #fff; border: 1px solid var(--line);
          border-radius: 12px; padding: 0.8rem 1rem; max-height: 22rem; overflow: auto; }
.legend { font-size: 0.85rem; }
.legend code { background: var(--sky-soft); padding: 0 0.3rem; border-radius: 6px; }
@media (max-width: 560px) { .ep-card { grid-template-columns: 1fr; } }
