/* =====================================================================
   Begin at the Beginning (R207), in the fleet's dress (R145). The tokens,
   the bar, the cards, the buttons, and the toast are the Looking-Glass's;
   what is left here is the book's own: the red bar, the funnel's big
   buttons, the one-screen page with its capital labels, the gaps, the
   tap-to-call links, and the print layout. Phone-first: one column,
   thumb-sized targets, nothing precious. Read by someone whose night is
   going wrong, so nothing moves, nothing fades, nothing is clever.
   ===================================================================== */
body { font-size: 18px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 12px 16px 96px; }
.hidden { display: none !important; }
.card { padding: 16px 18px; }
.fine { color: var(--muted); font-size: 15px; }

/* ---------- the red bar: 911 on every screen ---------- */
.sos { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--danger); color: #fff;
  border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; text-decoration: none; font-family: var(--sans); font-weight: 800; }
.sos .big { font-size: 26px; letter-spacing: .04em; }
.sos .say { font-weight: 500; font-size: 15px; line-height: 1.25; opacity: .95; }
.sos:active { filter: brightness(.9); }

/* ---------- the house line and the search ---------- */
.house { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.house h1 { font-family: var(--fell); font-weight: 400; font-size: 30px; margin: 0; color: var(--ink); }
.house .ver { font-family: var(--sans); font-size: 13px; color: var(--muted); white-space: nowrap; }
.search { width: 100%; box-sizing: border-box; background: var(--paper); color: var(--ink); border: 2px solid var(--line);
  border-radius: 14px; padding: 14px 16px; font-size: 18px; margin: 0 0 14px; }
.search:focus { outline: none; border-color: var(--ink); }

/* ---------- the funnel: big buttons, one column ---------- */
.menu { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0 0 18px; }
.door { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; background: var(--paper); color: var(--ink);
  border: 2px solid var(--line); border-radius: 16px; text-decoration: none; font-family: var(--sans); font-weight: 800; font-size: 18px; cursor: pointer; text-align: left; }
.door:active { background: var(--ink); color: var(--cream); }
.door .n { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px;
  background: var(--panel2, var(--line)); color: var(--ink); }
.door.danger { border-color: var(--danger); }
.door.danger .n { background: var(--badbg); color: var(--danger); }
.door.act { border-color: var(--gold, var(--line)); }
.door .t { flex: 1 1 auto; }
.door .sub { display: block; font-weight: 500; font-size: 14px; color: var(--muted); margin-top: 2px; }
.door .lock { font-size: 15px; color: var(--muted); }
.menu.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 380px) { .menu.two { grid-template-columns: 1fr; } }

/* ---------- a section's list and a search's results ---------- */
.crumb { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.crumb a { color: inherit; }
.list { display: grid; gap: 8px; margin: 0 0 18px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 10px 16px; background: var(--paper);
  color: var(--ink); border: 2px solid var(--line); border-radius: 14px; text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: 17px; }
.row:active { background: var(--ink); color: var(--cream); }
.row .hit { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- the page ---------- */
.page h1 { font-family: var(--fell); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 0 0 4px; color: var(--ink); }
.page .meta { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.page h3.lab { font-family: var(--fellsc); font-weight: 400; font-size: 17px; letter-spacing: .12em; color: var(--ink); margin: 18px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.page h3.lab:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }
.page p { margin: 0 0 8px; line-height: 1.4; }
.page p.lead { font-weight: 600; }
.page ul, .page ol { margin: 0 0 8px; padding-left: 22px; line-height: 1.4; }
.page li { margin: 0 0 6px; }
.page a.tel { font-family: var(--sans); font-weight: 800; white-space: nowrap; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.page a.xref { font-weight: 700; color: var(--ink); }
mark.gap { background: var(--warnbg); color: var(--amber); font-weight: 700; border-radius: 6px; padding: 0 4px; }
.page table.t { font-size: 15px; }
.page ul.gaps > li { margin-bottom: 10px; }

/* ---------- the sticky foot: call the manager, log it ---------- */
.foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--cream); border-top: 1px solid var(--line); z-index: 20; }
.foot .in { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foot .btn { width: 100%; min-height: 48px; }
.foot .btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ---------- the guild door ---------- */
.door-card { padding: 20px; }
.door-card h2 { margin: 0 0 8px; font-family: var(--fellsc); font-weight: 400; font-size: 19px; letter-spacing: .1em; color: var(--ink); }
.door-card input { width: 100%; box-sizing: border-box; background: var(--paper); color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 14px; font-size: 20px; margin: 8px 0 10px; }
.door-card .err { color: var(--danger); font-weight: 700; min-height: 1.4em; }
.offline { font-family: var(--sans); font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 10px; }

/* ---------- paper ---------- */
@media print {
  body { font-size: 12pt; }
  .wrap { max-width: none; padding: 0; }
  .sos, .search, .foot, .menu, .crumb, .lg-bar, .door-card { display: none !important; }
  .page { page-break-after: always; }
  .page h1 { font-size: 22pt; }
  .page h3.lab { font-size: 11pt; margin: 10pt 0 3pt; }
  mark.gap { background: none; border: 1px dashed #000; }
  a { color: inherit; text-decoration: none; }
}
