/* The Housing Office: the Workers' Houses (/housing) and the game master's
   desk (/admin/housing). Only the shared colour tokens are used. The houses
   are cards under a heavy rule with a red lead, like the jobs; the pictures
   sit side by side; the placement batches are console text to copy. */

.housing-stage { max-width: var(--measure); border-left: 6px solid var(--gold); padding: 0.4rem 0 0.4rem 0.8rem; }
.housing-free { font-weight: 750; color: var(--civic); }
.housing-error { font-weight: 650; }

/* The houses. */
.housing-list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 2.5rem; }
.housing-card { border-top: 6px solid var(--ink); padding-top: 0.75rem; position: relative; }
.housing-card::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  width: 4.5rem;
  height: 6px;
  background: var(--civic);
}
.housing-card__name {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 850;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.housing-card__for { font-size: 1.1rem; font-weight: 600; margin-top: 0.25rem; }
.housing-card__pictures { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; margin: 0.75rem 0; }
.housing-card__pictures img { width: 100%; height: auto; display: block; border: 3px solid var(--ink); background: var(--paper-deep); }
.housing-card__price { font-size: 1.05rem; }
.housing-card__bill summary { cursor: pointer; font-weight: 650; }
.housing-materials caption { text-align: left; color: var(--ink-soft); font-size: 0.9rem; padding-bottom: 0.3rem; }

/* The Housing Office in the world: the clerk beside the text, the offices open. */
.housing-office { margin: 2.5rem 0; }
.housing-office__body { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; }
.housing-office__body > div { flex: 1 1 18rem; max-width: var(--measure); }
.housing-office__npc { margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: flex-end; max-width: 9rem; }
.housing-office__npc figcaption { flex-basis: 100%; font-size: 0.85rem; color: var(--ink-soft); }
.housing-office__skin { width: 4rem; }
.housing-office__skin.npc-skin--back { width: 3rem; }
.housing-office__places { padding-left: 1.2rem; }

/* The two ways. */
.housing-how { margin: 2.5rem 0; }
.housing-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 2rem; }
.housing-ways h3 { border-bottom: 3px solid var(--ink); padding-bottom: 0.3rem; }
.housing-steps { padding-left: 1.4rem; }
.housing-steps li { margin-bottom: 0.5rem; }
.housing-commands { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 1.25rem 0 0; }
.housing-commands dt { font-weight: 600; }
.housing-commands dd { margin: 0; color: var(--ink-soft); }

/* The citizen's own. */
.housing-mine { margin: 2.5rem 0; }
.housing-mine__list { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 3px solid var(--ink); }
.housing-mine__item { border-bottom: 1px solid var(--rule); padding: 0.75rem 0; }
.housing-mine__item p { margin: 0.25rem 0; }
.housing-form { max-width: 30rem; }

/* The desk. */
.housing-desk { margin: 2.5rem 0 0; }
.housing-desk__item p { margin: 0.3rem 0; max-width: none; }
.housing-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.housing-batches { margin: 0.75rem 0; }
.housing-batches summary { cursor: pointer; font-weight: 700; }
.housing-batches h4 { margin: 1rem 0 0.25rem; }
.housing-pre {
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.8rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre;
}
.housing-pre--quiet { background: var(--paper-deep); color: var(--ink); }
