@font-face { font-family: Safiro; src: url(/fonts/Safiro-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: Safiro; src: url(/fonts/Safiro-Medium.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: Safiro; src: url(/fonts/Safiro-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: Safiro; src: url(/fonts/Safiro-Bold.woff) format("woff"); font-weight: 700; font-display: swap; }

:root {
  --ink: #000; --paper: #fff; --tile: #161616; --round: #1c1c1c;
  --muted-dark: #8a8a8a; --muted: #6b6b6b; --line: #ececec;
  --green: #00cb73; --green-h: #00bd6b; --error: #ff5a4e;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ink); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ink); color: var(--paper);
  font-family: Safiro, "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.4;
  letter-spacing: -.01em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.wordmark { display: block; width: 74px; height: 24px; fill: currentColor; }
.wordmark-lg { width: 120px; height: 38px; }

/* Boot */
.boot { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.boot .wordmark { width: 96px; height: 30px; opacity: .9; }

/* Sign in */
.signin { min-height: 100vh; min-height: 100dvh; padding: calc(var(--safe-top) + 88px) 24px calc(var(--safe-bottom) + 32px); display: flex; flex-direction: column; max-width: 440px; margin: 0 auto; }
.signin-title { margin: 14px 0 40px; font-size: 34px; font-weight: 600; letter-spacing: -.02em; color: var(--green); line-height: 1; }
.signin-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 500; color: var(--muted-dark); }
.field input {
  height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid #2a2a2a; background: var(--tile);
  font-size: 17px; /* 16px+ stops iOS zooming in */ outline: none;
}
.field input:focus { border-color: var(--green); }
.error { margin: 2px 0 0; color: var(--error); font-size: 14px; }
.btn {
  height: 52px; border: 0; border-radius: 14px; background: var(--green); color: var(--ink);
  font-size: 16px; font-weight: 600; margin-top: 8px;
}
.btn:active { background: var(--green-h); }
.btn[disabled] { opacity: .6; }
.btn-ghost { background: #f2f2f2; color: var(--ink); margin-top: 20px; }
.btn-plain { background: transparent; color: var(--muted); margin-top: 4px; }

/* Home */
.home { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.top { padding: calc(var(--safe-top) + 14px) 20px 0; display: flex; align-items: center; justify-content: space-between; }
.round { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--round); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.hello { padding: 24px 20px 0; }
.today { font-size: 14px; color: var(--muted-dark); font-weight: 500; }
.greeting { margin: 6px 0 0; font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; }

.install { margin: 18px 20px 0; padding: 14px 48px 14px 16px; border-radius: 16px; background: #0f2a1d; color: #d8fbe9; position: relative; font-size: 14px; line-height: 1.45; }
.install p { margin: 0; }
.install strong { color: #fff; font-weight: 600; }
.share-glyph svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.install-close svg { width: 16px; height: 16px; stroke: #9adfbf; stroke-width: 2; stroke-linecap: round; fill: none; }

.tiles { padding: 22px 20px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--tile); border-radius: 18px; padding: 14px 12px 12px; height: 112px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .12s ease, background .12s ease; }
.tile:active { transform: scale(.97); background: #222; }
.tile-icon { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-name { display: block; font-size: 14px; font-weight: 600; }
.tile-sub { display: block; font-size: 12px; color: var(--muted-dark); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.activity { margin-top: 24px; flex-grow: 1; background: var(--paper); color: var(--ink); border-radius: 26px 26px 0 0; padding: 22px 20px calc(var(--safe-bottom) + 24px); }
.activity h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.empty { margin-top: 16px; padding: 20px; border-radius: 16px; background: #f4f4f4; color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty p { margin: 0; }

/* Account sheet */
.sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sheet-panel { position: relative; width: 100%; background: var(--paper); color: var(--ink); border-radius: 24px 24px 0 0; padding: 26px 20px calc(var(--safe-bottom) + 16px); display: flex; flex-direction: column; animation: up .22s ease-out; }
.sheet-name { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.sheet-email { font-size: 14px; color: var(--muted); margin-top: 2px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet-panel { animation: none; } .tile { transition: none; } }

@media (min-width: 600px) {
  .home { max-width: 520px; margin: 0 auto; }
  .sheet-panel { max-width: 520px; margin: 0 auto; border-radius: 24px; margin-bottom: 24px; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
