@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/montserrat-700.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/open-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/open-sans-600.woff2") format("woff2"); }

/* Sunstorm app home screen and admin screens. */
:root {
  --oxford: #0f152e;
  --sky: #26cdff;
  --naples: #f2d157;
  --chestnut: #a5402d;
  --green: #1b634c;
  --head: "Montserrat", Arial, sans-serif;
  --body: "Open Sans", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* One look everywhere: storm blue sky, white type, gold actions. */
  --sky-1: #0a1030; --sky-2: #13286a; --sky-3: #1d6fc0; --sky-4: #26cdff;
  --fg: #fff; --muted: rgba(255, 255, 255, .74); --faint: rgba(255, 255, 255, .16);
  --glass: rgba(10, 16, 48, .38); --glass-edge: rgba(255, 255, 255, .16);
  --panel: rgba(18, 26, 64, .96); --panel-fg: #f2f5fb; --panel-muted: #aab4cf; --panel-line: rgba(255, 255, 255, .12);
  --field: rgba(255, 255, 255, .07); --soft: rgba(255, 255, 255, .08);
  --btn: #f2d157; --btn-fg: #0f152e;
  --label-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--fg); font: 16px/1.5 var(--body);
  background: var(--sky-1);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--naples); outline-offset: 3px; border-radius: 8px; }

/* ---------- The sky: storm clouds with the sun breaking through (static) ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(120% 70% at 85% 0%, rgba(242, 209, 87, .28) 0%, rgba(242, 209, 87, 0) 55%),
    linear-gradient(185deg, var(--sky-1) 0%, var(--sky-2) 42%, var(--sky-3) 78%, var(--sky-4) 100%); }
.orb { position: absolute; right: -40px; top: -40px; width: 230px; height: 230px; border-radius: 50%; transition: opacity .3s ease;
  background: radial-gradient(circle, #fffbe8 0%, #fde89a 18%, rgba(242, 209, 87, .75) 34%, rgba(242, 209, 87, .18) 58%, rgba(242, 209, 87, 0) 72%); }
/* Soft beams of light falling from the sun, wide and blurred like light through clouds. */
.rays { position: absolute; right: 75px; top: 75px; width: 0; height: 0; transition: opacity .3s ease; }
.rays i { position: absolute; left: 0; top: 0; width: var(--w); height: 120vh; margin-left: calc(var(--w) / -2);
  transform-origin: 50% 0; transform: rotate(var(--a)); mix-blend-mode: screen;
  background: linear-gradient(180deg, rgba(255, 226, 140, var(--o)) 0%, rgba(255, 226, 140, calc(var(--o) * .5)) 30%, rgba(255, 226, 140, 0) 70%);
  -webkit-mask: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent); mask: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent);
  filter: blur(6px); }
.cloud { position: absolute; border-radius: 50%; filter: blur(28px); }
.cloud.c1 { left: -20%; top: 18%; width: 90%; height: 140px; background: rgba(6, 10, 34, .55); }
.cloud.c2 { right: -25%; top: 34%; width: 80%; height: 120px; background: rgba(10, 18, 56, .45); }
.cloud.c3 { left: 10%; bottom: -60px; width: 120%; height: 200px; background: rgba(38, 205, 255, .35); filter: blur(50px); }
@media (min-width: 700px) {
  .orb { width: 340px; height: 340px; right: 4%; top: -90px; }
  .rays { right: calc(4% + 170px); top: 80px; }
}
html[data-view="people"] .orb, html[data-view="activity"] .orb, html[data-view="updates"] .orb,
html[data-view="people"] .rays, html[data-view="activity"] .rays, html[data-view="updates"] .rays { opacity: .25; }

/* ---------- Top bar ---------- */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left)); }
.bar.scrolled { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); box-shadow: 0 1px 0 var(--faint); }
.bar .logo { height: 34px; width: auto; display: block; }
.bar .grow { flex: 1; }
.bar .back { background: none; border: 0; display: flex; align-items: center; gap: 4px; padding: 8px 6px 8px 0; font: 600 16px var(--head); }
.bar h1 { font-size: 17px; font-weight: 600; }
.bar.titled { display: grid; grid-template-columns: 1fr auto 1fr; }
.bar.titled h1 { text-align: center; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--glass-edge); background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font: 700 14px/38px var(--head); text-align: center; }

main { max-width: 1040px; margin: 0 auto; padding: 18px max(22px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
main.has-dock { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }

/* ---------- Greeting ---------- */
.hello { padding: 84px 0 8px; }
.hello p { max-width: 62ch; text-wrap: pretty; }
@media (min-width: 700px) { .hello { padding-top: 120px; } }
.hello h2 { font-size: clamp(32px, 8.4vw, 52px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; }
.hello p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.hello .wx { display: block; color: var(--fg); font-weight: 600; }
.hello .here { background: none; border: 0; padding: 0 0 0 2px; color: var(--naples); font: 600 14px var(--body); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ---------- Home screen icons ---------- */
.apps { list-style: none; margin: 34px -8px 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 0; }
@media (min-width: 700px) { .apps { grid-template-columns: repeat(auto-fill, 128px); gap: 34px 30px; } }
.app { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 0; text-align: center; }
.squircle { position: relative; width: min(68px, 19vw); aspect-ratio: 1; border-radius: 23%; display: grid; place-items: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 52%, color-mix(in srgb, var(--c) 82%, #000) 100%);
  color: var(--glyph, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 6px rgba(0, 0, 0, .12), 0 10px 22px -8px rgba(5, 10, 30, .45);
  transition: transform .18s var(--ease); }
.squircle::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.squircle svg { width: 52%; height: 52%; }
@media (min-width: 700px) { .squircle { width: 92px; } }
.app:active .squircle { transform: scale(.9); }
@media (hover: hover) { .app:hover .squircle { transform: translateY(-3px); } }
.app .name { font: 600 12px/1.25 var(--head); letter-spacing: -.01em; padding: 0 2px; text-shadow: var(--label-shadow); max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app .desc { display: none; }
@media (min-width: 700px) {
  .app .name { font-size: 14.5px; }
  .app .desc { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: -4px; }
}
.empty { margin-top: 28px; padding: 18px 20px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* ---------- Dock (admins) ---------- */
.dock { position: fixed; z-index: 6; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 6px; padding: 12px 14px 10px; border-radius: 32px;
  background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(26px) saturate(1.7); backdrop-filter: blur(26px) saturate(1.7);
  box-shadow: 0 18px 40px -16px rgba(5, 10, 30, .45); }
.dock .app { width: 84px; gap: 6px; }
.dock .squircle { width: 56px; }
.dock .app .name { font-size: 11.5px; }
.dock .app .desc { display: none; }

/* ---------- Opening an app ---------- */
.launch { position: fixed; z-index: 50; display: grid; place-items: center; overflow: hidden; color: var(--glyph, #fff); background: var(--c);
  border-radius: 23%; transition: top .42s var(--ease), left .42s var(--ease), right .42s var(--ease), bottom .42s var(--ease), border-radius .42s var(--ease); }
.launch .inner { display: grid; justify-items: center; gap: 14px; opacity: 0; transform: scale(.85); transition: opacity .3s ease .16s, transform .42s var(--ease) .1s; }
.launch.open { border-radius: 0; }
.launch.open .inner { opacity: 1; transform: none; }
.launch svg { width: 64px; height: 64px; }
.launch b { font: 700 20px var(--head); }
.launch .dots { display: flex; gap: 6px; }
.launch .dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; animation: pulse 1s infinite; }
.launch .dots i:nth-child(2) { animation-delay: .15s; } .launch .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 50% { opacity: 1; } }

/* ---------- Sign-in ---------- */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); }
.signin .wrap { width: 100%; max-width: 400px; }
.signin .brand { display: flex; justify-content: center; margin: 0 0 26px; }
.signin .brand img { height: 72px; }
.card { background: var(--panel); color: var(--panel-fg); border-radius: 28px; padding: 28px 24px 22px; border: 1px solid var(--glass-edge);
  box-shadow: 0 30px 60px -24px rgba(5, 10, 30, .5); }
.card h1 { font-size: 24px; letter-spacing: -.01em; }
.card .lead { color: var(--panel-muted); margin: 6px 0 18px; font-size: 15px; }
.version { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; text-shadow: var(--label-shadow); }
.version button { background: none; border: 0; color: inherit; text-decoration: underline; padding: 0; font-size: inherit; }

label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input, select { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--panel-line); background: var(--field); color: var(--panel-fg); font-size: 16px; }
input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 25%, transparent); }
input.code { letter-spacing: .4em; font: 600 26px/1 var(--head); text-align: center; padding: 14px 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 18px;
  font: 600 15.5px/1 var(--head); background: var(--btn); color: var(--btn-fg); min-height: 50px; transition: transform .12s var(--ease); }
.btn:active { transform: scale(.98); }
.btn.full { width: 100%; margin-top: 18px; }
.btn.ghost { background: transparent; color: var(--panel-fg); border: 1.5px solid var(--panel-line); }
.btn.danger { background: var(--chestnut); color: #fff; }
.btn.small { min-height: 40px; padding: 9px 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.link { background: none; border: 0; color: var(--panel-muted); text-decoration: underline; padding: 10px 0 0; font-size: 14px; display: block; margin: 0 auto; }
.msg { margin-top: 14px; padding: 11px 13px; border-radius: 14px; font-size: 14px; }
.msg.err { background: #fbecea; color: #7d2a1c; }
.msg.ok { background: #e3f6ee; color: #134b39; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60; max-width: 92vw; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.banner { margin-top: 18px; padding: 11px 14px; border-radius: 16px; font-size: 14px; background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* ---------- Sheets, lists, admin pages ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(7, 11, 28, .4); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } }
.sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--panel); color: var(--panel-fg); border-radius: 28px 28px 0 0;
  padding: 22px 22px calc(24px + env(safe-area-inset-bottom)); animation: rise .32s var(--ease); }
@media (min-width: 700px) { .sheet { border-radius: 28px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { font-size: 21px; }
.sheet .sub { color: var(--panel-muted); margin: 4px 0 8px; font-size: 14px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.menu { list-style: none; margin: 14px 0 0; padding: 0; }
.menu button { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--panel-line); padding: 15px 4px; display: flex; gap: 12px; align-items: center; font-size: 15.5px; }

.panel { background: var(--panel); color: var(--panel-fg); border-radius: 22px; border: 1px solid var(--glass-edge); box-shadow: 0 24px 50px -30px rgba(5, 10, 30, .5); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input { flex: 1 1 220px; background: var(--panel); border-color: var(--glass-edge); }
.list { margin-top: 16px; overflow: hidden; }
.person { width: 100%; text-align: left; border: 0; background: none; color: inherit; border-top: 1px solid var(--panel-line); padding: 14px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.person:first-child { border-top: 0; }
.person .who { font-weight: 600; }
.person .mail { color: var(--panel-muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-size: 12px; border-radius: 999px; padding: 3px 10px; background: var(--soft); white-space: nowrap; }
.chip.off { background: #fbecea; color: #7d2a1c; }
.chip.admin { background: var(--oxford); color: #fff; }
.chip.admin { background: var(--naples); color: var(--oxford); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { flex: 1 1 0; min-width: 90px; border: 1.5px solid var(--panel-line); background: var(--field); border-radius: 14px; padding: 11px 10px; font-weight: 600; }
.seg button[aria-pressed="true"] { border-color: var(--btn); background: var(--btn); color: var(--btn-fg); }
.note { color: var(--panel-muted); font-size: 13.5px; margin-top: 8px; }
main > .note { color: var(--muted); text-shadow: var(--label-shadow); }
.log { list-style: none; margin: 0; padding: 4px 18px; }
.log li { padding: 13px 0; border-top: 1px solid var(--panel-line); font-size: 14.5px; }
.log li:first-child { border-top: 0; }
.log time { display: block; color: var(--panel-muted); font-size: 12.5px; }
.updates article { background: var(--panel); color: var(--panel-fg); border-radius: 22px; padding: 18px 20px; margin-top: 12px; border: 1px solid var(--glass-edge); }
.sheet .updates article { background: var(--soft); border: 0; }
.updates h3 { font-size: 16px; }
.updates time { color: var(--panel-muted); font-size: 13px; }
.updates ul { margin: 8px 0 0; padding-left: 20px; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 44px; text-shadow: var(--label-shadow); }
@media (max-width: 600px) {
  .person { grid-template-columns: 1fr; }
  .person .chips { justify-content: flex-start; margin-top: 4px; }
  .toolbar .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
