/* One entry. */
.entry-page { max-width: 1080px; margin: 0 auto; }
/* Back (entry, settings, help, contact, recordings, admin). Tall enough to hit with a thumb. */
.back-link { display: inline-flex; align-items: center; min-height: 40px; margin: -8px 0 6px; padding-right: 12px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.entry-head { margin-bottom: 24px; max-width: 760px; }
.entry-head-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.entry-h1 { margin-bottom: 10px; }
.entry-lead { font-size: 18px; line-height: 1.5; color: var(--ink-60); margin: 0; }

.entry-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.entry-main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.entry-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 18px; padding-left: 24px; border-left: 1px solid var(--line); font-size: 14px; }
.entry-facet .eyebrow { margin-bottom: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips a.chip { text-decoration: none; color: inherit; }
.download-links { display: flex; flex-direction: column; gap: 6px; }
.download-links a { color: var(--ink); }
.entry-side-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }

.entry-state { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.entry-state > .spinner { flex: none; }
.entry-state > div { flex: 1; min-width: 200px; }
.entry-state.danger { background: var(--danger-soft); border-color: transparent; }
.entry-state.warn { background: var(--warn-soft); border-color: transparent; }
.entry-audio { width: 100%; }
.entry-actions ul { margin: 6px 0 0; padding-left: 20px; }
.entry-actions li { margin-bottom: 4px; }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.segmented button { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 9px 14px; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

.topic-block { padding: 18px 0; border-top: 1px solid var(--line); }
.topic-block:first-child { border-top: 0; padding-top: 0; }
.topic-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.topic-summary { color: var(--muted); font-size: 14px; }
.entry-para, .transcript-body p { font-size: 16px; line-height: 1.7; margin: 0 0 14px; max-width: 68ch; }
.entry-para.typed { padding-left: 14px; border-left: 2px solid var(--accent-line); }
.para-tag { display: block; margin-bottom: 2px; }
.transcript-body { margin-bottom: 24px; }
.transcript-body.typed { padding-left: 14px; border-left: 2px solid var(--accent-line); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
button.small-btn, .small-btn { padding: 6px 10px; font-size: 13px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-tile { padding: 0; border: 1px solid var(--line); background: var(--surface); flex-direction: column; align-items: stretch; gap: 0; border-radius: var(--radius); overflow: hidden; }
.photo-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-cap { font-size: 12px; padding: 6px 8px; text-align: left; color: var(--ink-60); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lightbox-modal { max-width: min(1100px, 96vw); padding: 16px; }
.lightbox-img { background: #000; display: flex; justify-content: center; }
.lightbox-img img { max-height: 70vh; width: auto; max-width: 100%; object-fit: contain; }
.lightbox-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.lightbox-cap { margin-top: 10px; }

.entry-edit { display: flex; flex-direction: column; }
.entry-edit .edit-when { align-items: flex-start; }
.entry-edit .edit-when .field { flex: 1; min-width: 140px; }
.edit-long { font-size: 15px; line-height: 1.6; }
.topic-edit { margin-bottom: 8px; min-height: 30px; }
.topic-edit .chip button { font-size: 15px; }
.entry-edit .row input { flex: 1; width: auto; }
.edit-actions { margin-top: 8px; }

@media (max-width: 900px) {
  .entry-cols { grid-template-columns: 1fr; gap: 28px; }
  .entry-side { position: static; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
}
