
:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #232823;
  --muted: #575f58;
  --border: #deded6;
  --accent: #315749;
  --soft: #edf0e9;
  font: 16px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
body { margin: 0; color: var(--ink); background: var(--paper); }
h1, h2, h3, p { margin: 0; }
h1, .brand { font-family: Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2rem, 5.5vw, 3.15rem); line-height: 1.08; letter-spacing: -.04em; }
h2 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -.015em; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }
button {
  padding: .55rem .8rem; border: 1px solid var(--border); border-radius: .35rem;
  background: transparent; color: var(--ink); font-size: .875rem; font-weight: 600; cursor: pointer;
}
button:hover { background: var(--soft); }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.primary:hover { background: #254638; }
.quiet { border: 0; padding: .45rem .55rem; color: var(--accent); }
.shell { max-width: 47rem; margin: auto; padding: 0 clamp(1rem, 4vw, 2rem) 3rem; }
.masthead {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 4rem; border-bottom: 1px solid var(--border);
}
.brand { color: var(--ink); text-decoration: none; font-size: 1.5rem; letter-spacing: -.035em; }
.featured { padding-top: clamp(1.5rem, 5vw, 2.5rem); overflow-wrap: anywhere; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.featured h1 { margin-top: .45rem; }
.metadata { color: var(--muted); font-size: .875rem; }
#episode-meta { margin-top: .6rem; }
audio { display: block; margin-top: 1rem; width: 100%; }
.summary { max-width: 62ch; margin-top: .85rem; }
.summary:empty { display: none; }
details { margin-top: .8rem; }
details summary { cursor: pointer; color: var(--accent); font-size: .875rem; font-weight: 600; }
#episode-notes { max-width: 68ch; font-size: .95rem; }
#episode-notes h3 { font-size: 1rem; margin-top: 1rem; }
#episode-notes p { margin-top: .6rem; }
.topics, #archive { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
#topics-help { margin-top: .25rem; }
.topics fieldset { border: 0; margin: .75rem 0 0; min-width: 0; padding: 0; }
.topic-list { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 .65rem; list-style: none; }
.topic-list li {
  display: inline-flex; align-items: center; gap: .15rem; max-width: 100%;
  padding-left: .7rem; background: var(--soft); border-radius: 1rem; font-size: .875rem;
}
.topic-list span { min-width: 0; overflow-wrap: anywhere; }
.topic-list button { flex: none; border: 0; border-radius: 50%; width: 2rem; height: 2rem; padding: 0; font-size: 1.05rem; }
.topic-list button:hover { background: #dfe5db; }
.topics .status:empty { margin: 0; }
.episodes { list-style: none; padding: 0; margin: .35rem 0 .65rem; }
.episodes li + li { border-top: 1px solid var(--border); }
.episode-row {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: .85rem; padding: .7rem .35rem; text-align: left; border: 0;
}
.episode-row strong { font-size: .95rem; overflow-wrap: anywhere; }
.episode-row small { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.episode-row[aria-current] { background: var(--soft); }
.episode-row > span:last-child { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.status, #archive-empty { color: var(--muted); font-size: .875rem; margin-top: .5rem; }
.locked { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.signin { width: min(100%, 25rem); }
.signin h1 { margin-bottom: 1.25rem; }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .35rem; }
input {
  display: block; width: 100%; min-width: 0; border: 1px solid #878f85;
  padding: .55rem .7rem; color: var(--ink); background: white; border-radius: .35rem;
}
input::placeholder { color: var(--muted); }
.signin-fields { display: flex; gap: .6rem; align-items: stretch; }
.signin-fields button { flex: none; }
dialog {
  border: 1px solid var(--border); border-radius: .5rem; padding: clamp(1rem, 4vw, 1.5rem);
  background: var(--paper); color: var(--ink); width: min(28rem, calc(100% - 2rem));
}
dialog::backdrop { background: #20282380; }
.dialog-head { margin-bottom: .65rem; }
.dialog-actions { display: flex; align-items: center; gap: .65rem; margin-top: .85rem; }
dialog label { margin-top: .85rem; }
.dialog-actions .status { margin: 0; }
.signout { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .65rem; }
