/* The state functionaries and the People's Library: a civic directory.
   Each group is marked by a rule in its own colour of the register (red for
   the Academy, steel for the Health Service, ochre for Culture, black for the
   wardens). Uses the tokens of site.css. */

.functionary-group { margin-top: 2.5rem; }
.functionary-group__lede { color: var(--ink-soft); max-width: var(--measure); }

.functionary-list {
  list-style: none; padding: 0; margin: 1rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2rem;
}
.functionary { border-top: 3px solid var(--ink); padding-top: 0.75rem; }
.functionary--academy { border-top-color: var(--civic); }
.functionary--health { border-top-color: var(--brick); }
.functionary--culture { border-top-color: var(--ochre); }
.functionary h3 { margin-bottom: 0.25rem; }
.functionary p { margin-bottom: 0.5rem; }
.functionary__place { font-size: 0.9rem; font-weight: 650; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
/* The functionary's skin (drawn pixel for pixel by .npc-skin in square.css), beside the text */
.functionary .functionary__skin { float: right; width: 3rem; margin: 0 0 0.5rem 0.75rem; }
.functionary::after { content: ''; display: block; clear: both; }

.commands { list-style: none; padding: 0; margin: 0; }
.commands li { margin: 0 0 0.25rem; }
.commands code, .command-reference code, .library-books code, .lecture-shelf__list code, .building-list code {
  font-size: 0.85rem; background: var(--paper-deep); padding: 0.05rem 0.3rem; border-radius: var(--radius); overflow-wrap: anywhere;
}

.functionary-notes { max-width: var(--measure); }
.command-reference dt { margin-top: 0.75rem; }
.command-reference dd { margin: 0.2rem 0 0 1rem; }
.building-list { padding-left: 1.2rem; }
.building-list li { margin-bottom: 0.4rem; }

/* The library */
.library-books { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.library-books li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: baseline; }
.library-books a { font-weight: 650; }

.lecture-shelves { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem 2rem; }
.lecture-shelf { border-top: 3px solid var(--civic); padding-top: 0.75rem; }
.lecture-shelf h3 { margin-bottom: 0; }
.lecture-shelf__list { padding-left: 1.4rem; margin: 0.5rem 0 0; }
.lecture-shelf__list li { margin-bottom: 0.6rem; }
.lecture-shelf__list code { display: block; width: fit-content; margin-top: 0.15rem; }

.lecture__head { margin-bottom: 2rem; border-bottom: 1px solid var(--rule); padding-bottom: 1rem; }
.lecture__kicker { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--civic-deep); margin-bottom: 0.4rem; }
.lecture .prose h2 { font-size: 1.15rem; border-top: 3px solid var(--civic); padding-top: 0.5rem; margin-top: 2rem; }
.lecture__pager, .chronicle + .lecture__pager {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem;
  border-top: 3px solid var(--ink); margin-top: 3rem; padding-top: 0.75rem;
}
.chronicle .prose h2 { font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; border-top: 3px solid var(--ochre); padding-top: 0.5rem; margin-top: 2rem; }

/* My questions */
.conversation-list { list-style: none; padding: 0; margin: 0; }
.conversation { border-bottom: 1px solid var(--rule); padding: 1rem 0; max-width: var(--measure); }
.conversation__meta { display: flex; gap: 0.75rem; align-items: baseline; margin-bottom: 0.4rem; }
.conversation__meta span { color: var(--ink-soft); font-size: 0.9rem; }
.conversation__question { margin: 0 0 0.75rem; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--ink-soft); }
.conversation__question p:last-child, .conversation__answer p:last-child { margin-bottom: 0; }
.conversation__answer { border-left: 3px solid var(--civic); padding-left: 1rem; }

/* The game master's desk */
.usage td, .usage th { white-space: nowrap; }
.building-form { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1.5rem; max-width: 44rem; }
.building-form h3 { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.building-form h3 code { font-size: 0.8rem; font-weight: 500; }
.building-form .form--inline { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.building-form__xyz .field { flex: 1 1 6rem; }

/* A functionary's page: their services, one section each */
.service { max-width: var(--measure); margin-top: 2.5rem; border-top: 3px solid var(--ink); padding-top: 0.75rem; }
.service h2 { margin-top: 0; }
.service-form textarea { width: 100%; }
.service-form .choices { margin: 0.5rem 0 1rem; }
.service__login { font-weight: 600; }
.book-form { margin: 1rem 0; }
.book-form .field__hint { margin-top: 0.4rem; }
.library-books .inline .link-button { font-size: 0.9rem; }

/* Waiting for an answer or an ode */
.waiting { border-left: 3px solid var(--ochre); padding: 0.5rem 0 0.5rem 1rem; max-width: var(--measure); }
.waiting p:last-child { margin-bottom: 0; }
.conversation--single { border-bottom: none; }

/* An ode: stanzas as verse */
.ode { max-width: var(--measure); }
.ode__head { margin-bottom: 1.5rem; border-bottom: 1px solid var(--rule); padding-bottom: 1rem; }
.ode__poem { border-left: 3px solid var(--ochre); padding-left: 1rem; font-size: 1.05rem; line-height: 1.6; }
.ode__poem p { margin-bottom: 1.1rem; }

/* The check-up and the desk */
.checkup { max-width: var(--measure); }
.checkup__advice { border-left: 3px solid var(--brick); padding-left: 1rem; }
.writing-list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.writing { border-bottom: 1px solid var(--rule); padding: 0.6rem 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.writing > a, .writing > strong { font-weight: 650; }
.writing > span { color: var(--ink-soft); font-size: 0.9rem; }
.writing .empty { flex-basis: 100%; margin: 0; }
