/* The Deep Read. site.css is left alone; anything this section needs on top
   of it lives here, and every colour is one of that file's variables so the
   light and dark themes stay in step with the rest of the site. */

.dr {
  padding: var(--s-7) var(--px) var(--section-y);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

.dr-column {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

.dr-preview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
  align-items: baseline;
  margin: 0;
  font-size: var(--t-small);
  color: var(--muted);
}
.dr-preview a { color: var(--body); text-decoration: underline; text-underline-offset: 3px; }
.dr-preview a[aria-current="true"] { color: var(--ink); font-weight: 600; }

.dr-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  padding-top: var(--s-2);
}
.dr-switch a {
  font-size: var(--t-body);
  font-weight: 600;
  text-decoration: none;
  color: var(--body);
}
@media (hover: hover) { .dr-switch a:hover { color: var(--ink); } }
.dr-switch a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent);
}

.dr-how { display: flex; flex-direction: column; gap: var(--s-3); }
.dr-steps {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  color: var(--body);
}
.dr-art-only { cursor: default; }
.dr-art-only .art,
.dr-art-only .tile { border-bottom: 0; }

.dr-find,
.dr-search-block {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
.dr-search-block .label { margin: 0; }
#dr-search-prompt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
}
#dr-search-prompt[hidden] { display: none; }
.dr-request-place {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
}
.dr-request-place[hidden] { display: none; }
.dr-request-place fieldset[disabled] .dr-option { cursor: default; }

.dr-results,
.dr-jobs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dr-hit {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  padding: var(--s-3) 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--s-3) var(--s-4);
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.dr-hit-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dr-hit-title,
.dr-episode-title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  .dr-hit:hover .dr-hit-title {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}
.dr-hit[aria-pressed="true"] {
  box-shadow: inset 2px 0 0 var(--mark);
  padding-left: var(--s-3);
}

.dr-hit .art,
.dr-hit .tile,
.dr-confirm-art .art,
.dr-confirm-art .tile {
  width: 64px;
  height: 64px;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: var(--radius);
  font-size: 18px;
}

.dr-inlib {
  color: var(--mark);
  font-size: var(--t-small);
  font-weight: 600;
}

.dr-confirm-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: center;
}

.dr-choice {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.dr-choice legend {
  padding: 0;
  font-family: var(--sans);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dr-option {
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: var(--s-3);
  align-items: center;
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.dr-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}
.dr-option-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.dr-lengths { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) {
  .dr-lengths { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s-6); }
}

.dr-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
}

.dr-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.dr-style-block { padding-top: var(--s-4); }
.dr-style-block .dr-style-name { display: block; margin: 0; }
.dr-read {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}
.dr-style-name {
  font-weight: 600;
  color: var(--ink);
}

.dr-job {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--rule);
}
.dr-job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
}
.dr-state {
  flex-shrink: 0;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--muted);
}
.dr-state[data-state="done"] { color: var(--mark); }
.dr-state[data-state="failed"] { color: var(--accent); }

.dr-mine { display: flex; flex-direction: column; gap: var(--s-3); }

/* The library grid uses the catalogue's .show-grid. The card is an anchor,
   and an anchor would otherwise pick up the terracotta link colour. */
a.dr-show {
  text-decoration: none;
  color: var(--ink);
}
a.dr-show .meta { color: var(--muted); }

.dr-detail {
  padding: 0 var(--px) var(--section-y);
}
.dr-detail-head,
.dr-episode { max-width: 720px; }
.dr-detail-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-bottom: var(--s-4);
}
.dr-back { font-weight: 600; text-decoration: none; }
.dr-episode {
  padding: var(--s-5) 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.dr-pad {
  padding: 0 var(--px) var(--section-y);
}

@media (max-width: 720px) {
  .dr { padding-top: var(--s-6); }
  .dr-hit-title, .dr-episode-title { font-size: 16px; }
}
