:root {
  --bg: #fcfbf9;
  --card: #ffffff;
  --ink: #1b1b1b;
  --muted: #6b6b6b;
  --line: #e6e4e1;
  --chip: #ebeae8;
  --chip-hover: #dfddda;
  --radius: 16px;
  /* a thin edge plus a soft glow, so white boxes (and the wifi band) stand out from --bg */
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 6px 24px rgba(0, 0, 0, 0.06);
  --ease: 0.25s ease;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151515; --card: #1f1f1f; --ink: #f2f2f2; --muted: #a0a0a0; --line: #333; --chip: #2a2a2a; --chip-hover: #363636; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
}
/* The layout is built for phones. On wider windows the script in layout.html sets --wide
   (column width, up to 1.8x) and --scale (text and elements, up to 1.27x), so the guide gets
   much wider but only a little bigger, like the old Carrd guides. The column width is divided
   by --scale because zoom also enlarges it. Phones and no-JavaScript visits stay at 1x. */
body { zoom: var(--scale, 1); }
main {
  max-width: calc(440px * var(--wide, 1) / var(--scale, 1)); margin: 0 auto;
  padding: 36px 16px calc(40px + env(safe-area-inset-bottom));
  animation: enter 0.45s ease both;
}
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 900px) { main { padding-top: 48px; } }
@media (prefers-reduced-motion: reduce) { main { animation: none; } }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* home card: the hero sits inset in the card, wifi forms the card's footer */
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; padding: 8px 8px 0; box-shadow: var(--shadow); }
/* 8:5 on phones, getting wider and shorter with the column (up to 2.4:1) on desktop */
.hero { display: block; width: 100%; aspect-ratio: calc(0.6 + var(--wide, 1)); object-fit: cover; border-radius: 10px; }
.card-body { padding: 4px 10px 16px; }
h1 { font-size: 26px; line-height: 1.2; margin: 16px 0 6px; letter-spacing: -0.02em; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row .btn { font-size: 12px; padding: 8px 14px; }
.muted { color: var(--muted); font-size: 12px; }
.btn {
  appearance: none; border: 0; background: var(--chip); color: var(--ink); display: inline-block; text-decoration: none;
  font: inherit; font-size: 13px; font-weight: 500; padding: 9px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background-color var(--ease), transform 0.1s ease;
}
.btn:active { background: var(--chip-hover); transform: scale(0.97); }
.wifi {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--chip); margin: 0 -8px; padding: 14px 18px; font-size: 13px;
}
.wifi-label { display: flex; align-items: center; gap: 8px; }
.wifi-label svg { width: 16px; height: 16px; }
.wifi-info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.pw {
  appearance: none; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: opacity var(--ease);
}
.pw svg { width: 14px; height: 14px; color: var(--muted); }
.pw .i-check, .pw.copied .i-copy { display: none; }
.pw.copied .i-check { display: block; color: #2e8b57; }
.pw:active { opacity: 0.6; }

/* tiles: photos sit dimmed and brighten on hover or tap */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tile {
  position: relative; display: flex; align-items: flex-end; overflow: hidden; border-radius: 14px; height: 112px;
  padding: 0 26px 12px 14px; text-decoration: none; color: #fff; background: #3e3f40;
}
.tile.full { grid-column: 1 / -1; height: 128px; }
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.5); transition: filter var(--ease), transform 0.4s ease;
}
.tile span { position: relative; z-index: 1; font-size: 14px; font-weight: 400; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.tile::after {
  content: "\203A"; position: absolute; z-index: 1; right: 12px; bottom: 11px;
  font-size: 22px; line-height: 1; opacity: 0.85; transition: transform var(--ease);
}
.tile:active img { filter: brightness(0.7); transform: scale(1.03); }
.foot { text-align: center; font-size: 14px; margin: 26px 0 0; }
.foot a, .back { color: var(--muted); text-decoration: none; transition: color var(--ease); }
.foot a { display: inline-flex; align-items: center; gap: 5px; }
/* the navy compass logo; light gray in dark mode so it doesn't vanish */
.foot-logo { width: 20px; height: 20px; }
@media (prefers-color-scheme: dark) { .foot-logo { filter: brightness(0) invert(0.65); } }

/* hover effects only on devices that can hover (phones get the :active versions above) */
@media (hover: hover) {
  .btn:hover { background: var(--chip-hover); }
  .pw:hover { opacity: 0.7; }
  .tile:hover img { filter: brightness(0.7); transform: scale(1.03); }
  .tile:hover::after { transform: translateX(3px); }
  .foot a:hover, .back:hover { color: var(--ink); }
}

/* section pages */
.back { display: inline-block; font-size: 13px; margin: 0 0 14px; }
.page h2 { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; margin: 6px 0 12px; }
.prose { background: var(--card); border-radius: var(--radius); padding: 18px; font-size: 15px; box-shadow: var(--shadow); }
.page h2 + .prose { margin-top: 0; }
.page .prose + h2 { margin-top: 28px; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 12px; }
.prose h3 { font-size: 15px; font-weight: 700; margin: 20px 0 4px; }
.prose h4 { font-size: 14px; font-weight: 700; margin: 14px 0 2px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin: 3px 0; }
.prose hr { margin: 18px 0; }
.prose a { color: inherit; }
.prose.steps ol { list-style: none; counter-reset: step; padding: 0; margin: 4px 0 0; }
.prose.steps li { counter-increment: step; position: relative; background: var(--chip); border-radius: 12px; padding: 12px 14px 12px 50px; margin: 8px 0 0; }
.prose.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--card); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.prose.steps li img { display: block; width: 100%; height: auto; border-radius: 8px; margin-top: 10px; }
.prose.legal { font-size: 13px; line-height: 1.5; }
.prose.legal h3 { font-size: 13px; margin-top: 18px; }
.prose.legal h4 { font-size: 13px; }
/* each ### section is its own box, matching the check-in steps */
.prose .box { background: var(--chip); border-radius: 12px; padding: 12px 14px; margin: 8px 0 0; }
.prose .box > h3 { margin: 0 0 4px; }
.prose .box > :last-child { margin-bottom: 0; }
.prose .box ul, .prose .box ol { padding-left: 18px; }
.prose .box + :not(.box) { margin-top: 14px; }

/* directions dialog */
dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(340px, 90vw); background: var(--card); color: var(--ink); }
dialog:focus { outline: none; }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h3 { margin: 0 0 2px; font-size: 17px; }
dialog p { margin: 0 0 12px; }
dialog a, dialog .cancel {
  display: block; width: 100%; text-align: center; text-decoration: none; color: var(--ink); background: var(--chip);
  padding: 12px; border-radius: 12px; margin-top: 8px; font: inherit; font-weight: 600; font-size: 15px; border: 0; cursor: pointer;
  transition: background-color var(--ease), transform 0.1s ease;
}
/* each app is a row: icon, name, arrow */
dialog .nav-app { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px 10px 10px; font-weight: 500; }
dialog .nav-app img { width: 34px; height: 34px; flex: none; border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
/* the address under the title copies on tap, like the wifi password */
dialog .addr { color: var(--muted); font-size: 13px; font-weight: 400; text-align: left; }
dialog .nav-app::after { content: "\203A"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--muted); }
dialog .nav-app:active { background: var(--chip-hover); transform: scale(0.98); }
dialog .cancel { background: none; color: var(--muted); font-weight: 500; }
@media (hover: hover) { dialog .nav-app:hover { background: var(--chip-hover); } dialog .cancel:hover { color: var(--ink); } }
