:root { --brand: #0c4a8f; --navy: #0a2a5e; --cyan: #22d3ee; --orange: #ff7a1a; --yellow: #ffd23f; --ink: #14201f; --bg: #f6f8f8; --line: #d6dddd; color-scheme: light dark; }
@media (prefers-color-scheme: dark) { :root { --ink: #e7eeee; --bg: #101615; --line: #2a3533; } }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, sans-serif; color: var(--ink); background: var(--bg); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: var(--brand); color: #fff; }
.bar a, .bar .link { color: #fff; text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .2px; }
.brand img { border-radius: 10px; object-fit: cover; }
.langs a { opacity: .7; padding: 0 4px; } .langs a.on { opacity: 1; font-weight: 700; }
main { padding: 16px; max-width: 960px; margin: 0 auto; }
body.full main { max-width: none; padding: 0; }
footer { text-align: center; padding: 24px 16px; color: #667; font-size: 14px; }
.card { background: Canvas; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.narrow { max-width: 420px; margin: 24px auto; }
.form label { display: block; margin: 12px 0; font-size: 14px; }
.form input:not([type=checkbox]), .form select { display: block; width: 100%; padding: 10px; margin-top: 4px; font: inherit; border: 1px solid var(--line); border-radius: 8px; }
.form .check { display: flex; gap: 8px; align-items: center; font-size: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
button, .primary { font: inherit; cursor: pointer; }
.primary { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; text-decoration: none; margin-top: 8px; }
.secondary { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: inherit; margin: 8px 0; }
.link { background: none; border: 0; color: var(--brand); padding: 0; text-decoration: underline; }
.inline { display: inline; }
.error { color: #b42318; } .ok { color: #067647; } .notice { padding: 16px; } .hint { color: color-mix(in srgb, CanvasText 72%, transparent); font-size: 14px; }
table { width: 100%; border-collapse: collapse; } td, th { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.subnav { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 16px; } .tile b { display: block; font-size: 28px; }
.rows { list-style: none; padding: 0; } .rows li { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* the map screen: the navigation service's page fills everything under the bar */
#app { position: fixed; inset: 48px 0 0 0; }
#nav { width: 100%; height: 100%; border: 0; display: block; }
.dock { position: absolute; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.dock button { pointer-events: auto; padding: 10px 14px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; box-shadow: 0 2px 8px #0005; }
#unread { background: #fff; color: var(--brand); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
#panel { position: absolute; right: 8px; bottom: 64px; width: min(360px, calc(100% - 16px)); max-height: 50%; display: flex; flex-direction: column; background: Canvas; border: 1px solid var(--line); border-radius: 12px; }
#panel[hidden] { display: none; } #thread { list-style: none; margin: 0; padding: 8px; overflow: auto; flex: 1; } #compose { display: flex; gap: 6px; padding: 8px; } #compose input { flex: 1; }
#offline { position: absolute; top: 0; left: 0; right: 0; background: #fef0c7; color: #7a2e0e; margin: 0; padding: 6px 12px; } #offline[hidden] { display: none; }

/* ---- the JomOpis look: deep navy to cyan, with the logo's orange, red and yellow as accents ---- */
.bar { background: linear-gradient(90deg, var(--navy), var(--brand)); }
.primary { background: var(--orange); }
.link { color: var(--brand); }
.btn-main { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: linear-gradient(180deg, #ff9a2e, #ff6a13); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 6px 18px rgba(255, 106, 19, .45); }
.btn-main:hover { filter: brightness(1.06); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .7); color: #fff; font-weight: 700; text-decoration: none; background: rgba(255, 255, 255, .08); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; } .actions.center { justify-content: center; }

body.hero-page { background: var(--navy); }
body.hero-page main { max-width: none; padding: 0; }
body.hero-page .bar { position: absolute; z-index: 5; left: 0; right: 0; top: 0; background: linear-gradient(180deg, rgba(7, 28, 74, .75), transparent); }
.hero { position: relative; min-height: 100svh; color: #fff; overflow: hidden; display: flex; align-items: center; padding: 96px 20px 48px; isolation: isolate; }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.route-dash { animation: march 1.4s linear infinite; } @keyframes march { to { stroke-dashoffset: -36; } }
.hero-grid { width: 100%; max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.kicker { display: inline-block; margin: 0 0 12px; padding: 4px 14px; border-radius: 999px; background: var(--yellow); color: #0a2a5e; font-weight: 800; letter-spacing: .3px; transform: rotate(-2deg); }
.hero h1 { margin: 0; font-size: clamp(34px, 6vw, 62px); line-height: 1.05; font-weight: 900; text-shadow: 0 3px 0 rgba(5, 20, 60, .35); }
.lead { max-width: 34em; font-size: clamp(16px, 2.2vw, 19px); opacity: .95; margin: 16px 0 24px; }
.hero-logo img { width: 100%; height: auto; display: block; border-radius: 28px; box-shadow: 0 24px 60px rgba(3, 15, 50, .55); -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 52%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 58% 62% at 50% 52%, #000 55%, transparent 100%); box-shadow: none; }

.finder { position: relative; max-width: 560px; }
.finder-box { display: flex; align-items: center; gap: 10px; background: #fff; color: #10243f; border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: 0 12px 34px rgba(3, 15, 50, .45); }
.finder-box svg { flex: none; color: var(--brand); }
.finder-box input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 17px; background: transparent; color: inherit; padding: 12px 0; }
.finder-box .go { flex: none; border: 0; border-radius: 999px; padding: 0 20px; min-height: 46px; background: linear-gradient(180deg, #ff9a2e, #ff6a13); color: #fff; font-weight: 800; }
.finder-box:focus-within { outline: 3px solid var(--cyan); outline-offset: 2px; }
.hits { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: #fff; color: #10243f; border-radius: 18px; box-shadow: 0 16px 40px rgba(3, 15, 50, .5); max-height: 320px; overflow: auto; }
.hits[hidden] { display: none; }
.hits li { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; cursor: pointer; } .hits li span { font-size: 13px; color: #5a6b85; }
.hits li:hover, .hits li.on { background: #e8f4ff; }
.finder-note { margin: 10px 6px 0; font-size: 14px; opacity: .9; } .finder-note[hidden] { display: none; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 1160px; margin: 0 auto; padding: 40px 20px; }
.features article { background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; padding: 22px; color: #fff; }
.features h2 { margin: 8px 0 6px; font-size: 20px; } .features p { margin: 0; opacity: .88; } .ico { font-size: 30px; }
.band { text-align: center; color: #fff; padding: 56px 20px 64px; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .18)); }
.band h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); } .band p { max-width: 36em; margin: 0 auto; opacity: .92; }
body.hero-page footer { color: rgba(255, 255, 255, .7); background: rgba(5, 18, 52, .6); }
.langs a { border-radius: 6px; } .langs a.on { background: rgba(255, 255, 255, .22); }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; } .hero-logo { order: -1; max-width: 340px; margin: 0 auto; } .hero { align-items: flex-start; padding-top: 84px; }
  .bar nav { gap: 8px; font-size: 14px; } .brand span { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .route-dash { animation: none; } }

/* the guest sign-up sheet on the map page */
.sheet { position: absolute; inset: 0; z-index: 20; display: grid; place-items: end center; background: rgba(5, 18, 52, .55); padding: 16px; }
.sheet[hidden] { display: none; }
.sheet > div { width: min(440px, 100%); background: Canvas; color: CanvasText; border-radius: 24px; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.sheet h2 { margin: 0 0 6px; } .sheet p { margin: 0 0 16px; }
.sheet .actions { margin-top: 8px; } .sheet .btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }

/* "Powered by" credit: the logo is grey on transparent, so it sits on a white pill to stay readable on the dark pages */
footer p { margin: 0 0 12px; }
.powered { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 13px; }
.powered img { background: #fff; border-radius: 999px; padding: 6px 14px; height: 32px; width: auto; box-sizing: content-box; }
.powered:hover img, .powered:focus-visible img { box-shadow: 0 0 0 3px var(--yellow); }

/* the portal's own buttons (trip recording, messages) sit on the right edge, out of the way of the map screen's sheets and buttons */
/* on the LEFT edge: the navigation screen keeps its buttons (and the red emergency button) on the right, and nothing of ours may ever cover them */
.dock { left: 8px; right: auto; bottom: auto; top: 170px; flex-direction: column; align-items: flex-start; max-width: 60%; }
.dock button { font-size: 13px; padding: 8px 12px; }

/* the inbox panel: a list of friends, then one conversation */
#panel { padding: 8px; max-height: 60%; overflow: hidden; }
#inbox-list, #thread-view { display: flex; flex-direction: column; min-height: 0; overflow: auto; }
#thread-view { overflow: hidden; } #thread-view[hidden], #inbox-list[hidden] { display: none; }
#people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 10px 8px; border: 0; background: transparent; color: inherit; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.person span { font-size: 13px; opacity: .7; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .badge { position: absolute; right: 8px; top: 12px; font-style: normal; font-size: 12px; background: var(--orange); color: #fff; border-radius: 999px; padding: 0 7px; }
.thread-head { padding: 4px 8px; }
#thread li { padding: 6px 10px; margin: 4px 0; border-radius: 14px; max-width: 85%; width: fit-content; overflow-wrap: anywhere; }
#thread li.theirs { background: var(--line); } #thread li.mine { background: var(--brand); color: #fff; margin-left: auto; }

/* the avatar editor and the avatar badge */
.avatar-preview { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; font-size: 38px; margin: 8px 0; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.avatar-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pick { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: transparent; font-size: 24px; cursor: pointer; }
.pick.swatch { border-radius: 50%; border-color: transparent; }
.pick[aria-checked="true"] { outline: 3px solid var(--cyan); outline-offset: 1px; }

/* places: the search results inside a normal form, the share link, and the Go to office button */
.inline-hits { position: static; margin: 4px 0; background: Canvas; color: CanvasText; border: 1px solid var(--line); }
.linkbox { width: min(100%, 420px); padding: 6px 8px; font: inherit; }
.dock .office { pointer-events: auto; padding: 8px 12px; border-radius: 999px; background: linear-gradient(180deg, #ff9a2e, #ff6a13); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: 0 2px 8px #0005; }

.quiet-row { display: flex; gap: 12px; flex-wrap: wrap; } .quiet-row label { flex: 1; min-width: 130px; }

/* the sharing indicator: bright, so nobody forgets that their position is visible to others */
.dock .sharing { pointer-events: auto; background: #16a34a; color: #fff; border: 0; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 8px #0005; animation: pulse 2.4s ease-in-out infinite; }
.dock .sharing[hidden] { display: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, .25); } }
@media (prefers-reduced-motion: reduce) { .dock .sharing { animation: none; } }

/* the SOS page */
.sos-active { border-color: #d93025; box-shadow: 0 0 0 3px rgba(217, 48, 37, .35); }
.callbtn { margin: 4px 6px 4px 0; background: linear-gradient(180deg, #ef5350, #d93025); }

#app.sheet-open .dock { display: none; }
