@layer components {

/* cards with a poster, used on /engineering */
.cards { display: grid; gap: var(--s7); margin-top: var(--s7);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cards a { text-decoration: none; display: grid; gap: var(--s3); align-content: start; }
.card-frame { display: block; border: 1px solid var(--rule); border-radius: var(--r-lg);
  overflow: hidden; background: var(--film-ground); aspect-ratio: 16 / 10;
  transition: border-color var(--d-hover) ease; }
.card-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s1); }
.card-head strong { font-size: var(--t-heading); font-weight: 600; letter-spacing: -0.018em;
  color: var(--ink); }
.card-line { color: var(--ink-2); font-size: var(--t-small); }
.card-meta { font-size: var(--t-machine); color: var(--graphite); }
@media (hover: hover) and (pointer: fine) {
  .cards a:hover .card-frame { border-color: var(--rule-strong); }
  .cards a:hover .card-head strong { color: var(--accent); }
  .cards a:hover .card-head strong { text-decoration: underline; text-underline-offset: 3px; }
}

.row .idx { font-size: var(--t-machine); }

/* the five rooms on /design */
.rooms { border-top: 1px solid var(--rule-soft); }
.room { display: grid; grid-template-columns: auto minmax(0, 1fr) 208px; gap: var(--s6);
  align-items: baseline; padding-block: var(--s7);
  border-bottom: 1px solid var(--rule-soft); text-decoration: none;
  transition: background-color var(--d-hover) ease; }
.room-n { font-size: var(--t-machine); color: var(--graphite); }
.room-title { display: block; color: var(--ink);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); font-weight: 500;
  letter-spacing: -0.018em; line-height: 1.1; }
.room-line { display: block; margin-top: var(--s3); color: var(--ink-2);
  font-size: var(--t-small); max-width: 62ch; }
.room-head { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; }
.room-meta { font-size: var(--t-machine); color: var(--graphite); white-space: nowrap; }
.room-art { width: 208px; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--rule-soft); align-self: center;
  display: grid; place-items: center; padding: var(--s4);
  transition: border-color var(--d-hover) ease; }
.room-art > * { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .room:hover { background: var(--paper-2); }
  .room:hover .room-title { color: var(--accent); }
  .room:hover .room-art { border-color: var(--rule-strong); }
  .room:hover .room-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
}
@media (max-width: 900px) {
  .room { grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); padding-block: var(--s6); }
  .room-art { display: none; }
}

/* the room marks — drawn from each room's own material */
.ra-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ra-swatches i { display: block; aspect-ratio: 1; border-radius: 5px;
  box-shadow: inset 0 0 0 1px var(--rule-soft); }
.ra-sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.ra-sheet i { display: block; aspect-ratio: 4 / 3; border-radius: 3px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.ra-sheet i.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.ra-curve { color: var(--accent); width: 100%; height: auto; }
.ra-seats { display: grid; gap: 5px; position: relative; }
.ra-seats i { display: block; height: 7px; border-radius: 4px; background: var(--paper-3); }
.ra-seats i b { display: block; height: 100%; border-radius: 4px; background: var(--accent); opacity: .55; }
.ra-seats u { position: absolute; inset-block: -3px; left: 82%; width: 1.5px;
  background: var(--ink); opacity: .5; }
.ra-components { display: grid; grid-template-columns: repeat(3, auto); gap: 7px;
  justify-content: center; align-items: center; }
.ra-components b { padding: 4px 9px; border-radius: 6px; background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 500; }
.ra-components s { padding: 3px 8px; border-radius: var(--r-pill); background: var(--paper);
  border: 1px solid var(--rule); font-size: 9px; color: var(--ink-2); text-decoration: none; }
.ra-components i { width: 22px; height: 22px; border-radius: 6px; background: var(--paper);
  border: 1px solid var(--rule); }
.ra-components em { width: 22px; height: 22px; border-radius: 50%; background: var(--paper);
  border: 1px solid var(--rule); }
}
