/* Text-first layout. IBM Plex Sans for text, IBM Plex Mono for labels.
   Both are SIL Open Font License. Files are Latin woff2 subsets. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-600.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #1c1b19;
  --muted: #4f4b46;
  --paper: #faf8f5;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", Courier, monospace;
}

html[data-theme="night"] {
  color-scheme: dark;
  --ink: #f3efe6;
  --muted: #c8bfb2;
  --paper: #1c1916;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: min(38rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.15rem 0 0.4rem;
}

h1, h2, h3 { font-weight: 600; letter-spacing: 0; }

h1 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

h2 {
  margin: 0 0 1.15rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

h3 {
  margin: 1.35rem 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

p { margin: 0 0 0.9rem; }

ul { margin: 0.6rem 0 1.25rem; padding-left: 1.15rem; }

li { margin: 0.35rem 0; }

section { padding-top: 2.75rem; scroll-margin-top: 4.5rem; }

nav {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav a {
  display: inline-block;
  margin-right: 0.9rem;
  padding: 0.4rem 0;
}

.bar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.15rem;
}

.theme-toggle {
  border: 0;
  padding: 0.4rem 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  cursor: pointer;
}

html[data-theme="night"] .theme-night,
html:not([data-theme="night"]) .theme-day {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.theme-state {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--paper);
}

.skip:focus { top: 0.4rem; }

.group {
  margin: 0.85rem 0 1.35rem;
  padding: 0 0 0 0.15rem;
}

.show {
  padding: 1.15rem 0 0.35rem;
}

.show-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.2rem 1rem;
  margin-bottom: 0.2rem;
}

.show-line a,
.show-line span { font-weight: 700; }

.note, .fine, .empty { color: var(--muted); }

.archive-year h3 { margin-bottom: 0.15rem; }

.entry {
  padding: 0.45rem 0;
}

.entry p { margin: 0; }

.search { margin: 0.5rem 0 1rem; }

time,
.fine,
.detail,
.search label,
.signup label {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.search label,
.signup label {
  display: block;
  margin: 0.8rem 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search input,
.signup-field input,
.signup select {
  width: min(100%, 24rem);
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.search input { width: min(100%, 18rem); }

::placeholder { color: var(--muted); opacity: 1; }

#list.signup-box {
  margin-top: 2rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--ink);
}

.signup { max-width: 36rem; margin-top: 0.5rem; }
.signup-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
.signup-wide { grid-column: 1 / -1; }
.signup-field { min-width: 0; }
.signup-field input, .signup-field select { width: 100%; }
.signup-field select option { color: var(--ink); background: var(--paper); }
.bio-quote { margin: 1.3rem 0; padding-left: 1rem; border-left: 1px solid var(--ink); }
.bio-quote blockquote { margin: 0; }
.bio-quote figcaption { font-size: 0.85rem; }

@media (max-width: 560px) {
  .signup-fields { column-gap: 0.85rem; }
  .signup-field label { letter-spacing: 0.08em; margin-top: 0.65rem; }
  .signup-field input, .signup-field select { min-height: 2.5rem; }
  #signup-status:empty { display: none; }
}

@media (max-width: 365px) {
  .signup-fields { grid-template-columns: minmax(0, 1fr); }
}

.consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin-top: 0.8rem;
}

.consent input { margin-top: 0.35rem; }

.signup button {
  margin-top: 1.1rem;
  padding: 0.15rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.signup button:hover { border-bottom-width: 2px; }

.signup button:disabled { cursor: wait; opacity: 0.6; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

figure { margin: 0.8rem 0 1rem; }

figure img {
  max-width: min(100%, 240px);
  height: auto;
}

figcaption { color: var(--muted); font-size: 0.95rem; }

.player {
  width: 100%;
  height: 11rem;
  margin: 0.75rem 0 1rem;
}

.player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.episode { margin-bottom: 0.85rem; }

.catalog {
  margin: 0.4rem 0 1.4rem;
  padding: 0;
  list-style: none;
}

.catalog li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 1.5rem;
  align-items: baseline;
  margin: 0;
  padding: 0.55rem 0;
}

.catalog .detail {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-align: right;
}

footer {
  margin-top: 3.5rem;
  padding: 0.5rem 0 3rem;
}

@media (max-width: 40rem) {
  html { scroll-padding-top: 8.5rem; }
  section { scroll-margin-top: 8.5rem; }
  .show-line,
  .catalog li { display: block; }
  .catalog .detail { display: block; text-align: left; margin-top: 0.15rem; }
  nav { letter-spacing: 0.08em; }
  nav a { padding: 0.5rem 0.75rem 0.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  header { position: static; }
  nav, .search, .signup, .player, .skip { display: none; }
}
