/* Lobby hub: the building's directory. Same design language as the rooms' starting point (felt letterboard,
   painted wall, Atkinson for reading, Barlow only on the felt, yellow only for work in progress). */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/AtkinsonHyperlegible-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/AtkinsonHyperlegible-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/BarlowCondensed-600.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --wall: #e3e7ec;
  --paper: #ffffff;
  --ink: #1d2140;
  --ink-2: #5b6079;
  --rule: #cfd5de;
  --felt: #2b2a33;
  --felt-groove: #232229;
  --letter: #f5f5f2;
  --indigo: #3340a0;
  --indigo-ink: #ffffff;
  --signal: #ffc53d;
  --danger: #b42318;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --board: "Barlow Condensed", "Arial Narrow", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --wall: #171a2b;
    --paper: #1f2337;
    --ink: #e8eaf5;
    --ink-2: #a9aecb;
    --rule: #33395a;
    --felt: #0f0f14;
    --felt-groove: #08080b;
    --indigo: #5563d8;
    --danger: #ff8a7a;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--felt); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--wall); color: var(--ink); font: 17px/1.45 var(--font); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--indigo); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.in { width: 100%; max-width: 560px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* ---------- the directory (the one bold thing) ---------- */
.board {
  background-color: var(--felt);
  background-image: repeating-linear-gradient(to bottom, transparent 0 7px, var(--felt-groove) 7px 9px);
  color: var(--letter);
  font-family: var(--board);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  text-shadow: 0 1px 0 #000a;
  padding: calc(40px + env(safe-area-inset-top)) 0 34px;
}
.board .row1 { margin: 0; font: inherit; font-size: 56px; line-height: 1; letter-spacing: .18em; }
.board .row2 { margin: 12px 0 0; font-size: 19px; line-height: 1.2; letter-spacing: .12em; opacity: .82; overflow-wrap: anywhere; }

.directory { list-style: none; margin: 30px 0 0; padding: 0; }
.directory li + li { margin-top: 2px; }
.directory a, .directory .room {
  display: flex; align-items: baseline; gap: 10px; min-height: 46px; padding: 10px 0;
  color: var(--letter); text-decoration: none; font-size: 24px; line-height: 1.15;
}
.directory .name { min-width: 0; overflow-wrap: anywhere; }
.directory .lead { flex: 1; min-width: 24px; border-bottom: 3px dotted color-mix(in srgb, var(--letter) 38%, transparent); transform: translateY(-5px); }
.directory .count { font-size: 18px; letter-spacing: .12em; opacity: .82; white-space: nowrap; }
.directory a:hover .name, .directory a:focus-visible .name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.directory .building .count::before {
  content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%;
  background: var(--signal); vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite;
}
.directory .failed { opacity: .55; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .directory .building .count::before { animation: none; } }
.empty-line { margin: 30px 0 0; font-size: 19px; letter-spacing: .12em; opacity: .7; }

/* ---------- the wall below ---------- */
main { padding-top: 30px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
main section + section { margin-top: 40px; }
h2 { font-size: 21px; line-height: 1.25; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lede { color: var(--ink-2); }
.muted { color: var(--ink-2); font-size: 15px; }

form { display: grid; gap: 14px; margin-top: 16px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.field {
  width: 100%; padding: 12px 14px; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 10px;
  font-size: 17px; font-weight: 400; outline: none;
}
.field:focus { border-color: var(--indigo); }
select.field {
  appearance: none; padding-right: 44px;
  background: var(--paper) no-repeat right 16px center / 14px 9px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235b6079' stroke-width='2'/%3E%3C/svg%3E");
}
.address { display: flex; align-items: stretch; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 10px; overflow: hidden; }
.address:focus-within { border-color: var(--indigo); }
.address input { flex: 1 1 auto; min-width: 4ch; width: 0; border: 0; background: none; padding: 12px 0 12px 14px; font-size: 17px; font-weight: 400; outline: none; text-align: right; }
.address span { flex: none; align-self: center; padding: 0 14px 0 1px; color: var(--ink-2); font-size: 15px; font-weight: 400; white-space: nowrap; }
.note { font-weight: 400; font-size: 15px; color: var(--ink-2); min-height: 1.4em; }
.note.bad { color: var(--danger); }

.btn { justify-self: start; border: 0; border-radius: 10px; padding: 13px 20px; font-weight: 700; background: var(--indigo); color: var(--indigo-ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.quiet { background: transparent; border: 1.5px solid var(--rule); color: var(--ink); padding: 11.5px 18px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link { background: none; border: 0; padding: 0; color: var(--indigo); text-decoration: underline; cursor: pointer; font-size: inherit; }
.err { color: var(--danger); min-height: 1.3em; font-size: 15px; margin: 0; }
.hint { color: var(--ink-2); font-size: 15px; margin-top: 22px; }

/* ---------- install steps ---------- */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.seg button {
  border: 1.5px solid var(--rule); background: transparent; color: var(--ink); border-radius: 10px;
  padding: 8px 14px; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 40px;
}
.seg button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--wall); }
.steps { list-style: none; counter-reset: step; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  content: counter(step); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--felt); color: var(--letter); font: 600 17px/1 var(--board); box-shadow: inset 0 0 0 1.5px var(--rule);
}
.steps li > span { padding-top: 3px; }
.steps li b { font-weight: 700; }
.glyph { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: currentColor; color: var(--indigo); }
