/* Fonts are served from this site (no Google request, nLPD). SIL Open Font License, see fonts/. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2-variations'), url(fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2-variations'), url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* Layout: single mobile column, fixed bottom tab bar, cards only for actionable items (shifts, people). */
:root {
  --bg: #E9EDE6;        /* lichen */
  --surface: #F8FAF5;
  --line: #CDD5CA;
  --ink: #142019;
  --muted: #56645A;
  --spruce: #1E5A47;    /* primary: the network */
  --spruce-ink: #F4F8F2;
  --spore: #C7861A;     /* urgency: tonight, today */
  --spore-soft: #F3E2BE;
  --ok: #2F7D4F;
  --ok-soft: #D5EBDC;
  --bad: #A23B2C;
  --bad-soft: #F1D9D3;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1411; --surface: #17201B; --line: #2A372F; --ink: #E4ECE5; --muted: #95A69A;
    --spruce: #6CC19E; --spruce-ink: #0B1A13; --spore: #E7AB45; --spore-soft: #3A2E17;
    --ok: #7BCB97; --ok-soft: #1C3325; --bad: #E58C7C; --bad-soft: #3B201B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1411; --surface: #17201B; --line: #2A372F; --ink: #E4ECE5; --muted: #95A69A;
  --spruce: #6CC19E; --spruce-ink: #0B1A13; --spore: #E7AB45; --spore-soft: #3A2E17;
  --ok: #7BCB97; --ok-soft: #1C3325; --bad: #E58C7C; --bad-soft: #3B201B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--spruce); }
:focus-visible { outline: 3px solid var(--spruce); outline-offset: 2px; }

#app {
  max-width: 560px; margin: 0 auto; min-height: 100%;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 12px calc(var(--tabbar) + 24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 16px;
}
#app.no-tabs { padding-block-end: calc(24px + env(safe-area-inset-bottom, 0px)); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 650; }
h3 { font-size: 17px; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.num { font-variant-numeric: tabular-nums; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 10px; min-height: 44px; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 5; padding-block: 6px; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.wordmark svg { width: 26px; height: 26px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.iconbtn:active { background: var(--line); }
.demo-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--spore-soft); color: var(--spore); border: 0; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--spruce); color: var(--spruce-ink); width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.quiet { background: transparent; color: var(--spruce); min-height: 44px; padding: 0 8px; width: auto; }
.btn.sm { min-height: 40px; font-size: 14px; padding: 0 14px; width: auto; border-radius: 10px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad-soft); }
.btn.wa { background: #1F8F55; color: #fff; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Welcome */
.hero { position: relative; border-radius: 20px; overflow: hidden; background: var(--spruce); color: var(--spruce-ink); padding: 28px 22px 24px; display: flex; flex-direction: column; gap: 12px; min-height: 260px; justify-content: flex-end; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.hero > *:not(canvas) { position: relative; }
.hero h1 { font-size: 40px; font-weight: 800; }
.hero p { opacity: 0.9; max-width: 34ch; }
.side-choice { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 16px; cursor: pointer;
}
.choice:active { border-color: var(--spruce); }
.choice .glyph { width: 44px; height: 44px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; flex: none; color: var(--spruce); }
.choice strong { display: block; font-family: var(--font-display); font-size: 18px; }
.founding { border: 1.5px dashed var(--spore); border-radius: var(--r); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.founding b { color: var(--spore); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .flabel { font-weight: 700; font-size: 15px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); padding: 12px 14px; font-size: 16px;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--spruce); outline: none; }
.code-input { font-size: 28px; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 15px; font-weight: 600;
}
.chip.on { background: var(--spruce); color: var(--spruce-ink); border-color: var(--spruce); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days .chip { padding: 0; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-size: 22px; cursor: pointer; }
.stepper output { font-family: var(--font-display); font-size: 28px; font-weight: 700; min-width: 3ch; text-align: center; }
.stepper.sm { gap: 6px; }
.stepper.sm button { width: 44px; height: 44px; font-size: 20px; }
.stepper.sm output { font-size: 22px; min-width: 2.2ch; }
.role-exps { display: flex; flex-direction: column; }
.role-exp { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.role-exp:last-child { border-bottom: 0; }
.role-exp .yr { min-width: 3ch; font-weight: 400; }
.foot a { color: inherit; text-decoration: underline; }
.progress { display: flex; gap: 6px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.progress span.on { background: var(--spruce); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--spruce); }
.err { color: var(--bad); font-size: 14px; font-weight: 600; }

/* Toggle */
.switch-card { background: var(--surface); border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); }
.switch-card.on { border-color: var(--ok); }
.switch { position: relative; width: 56px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(24px); }

/* Segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--surface); }

/* Shift card */
.card { background: var(--surface); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
a.card { color: inherit; text-decoration: none; }
.when { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.when .day { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.when .hours { font-variant-numeric: tabular-nums; font-weight: 700; }
.when .dur { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.tag { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--bg); color: var(--ink); }
.tag.urgent { background: var(--spore-soft); color: var(--spore); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.muted { color: var(--muted); }
.rate { font-variant-numeric: tabular-nums; font-weight: 800; font-family: var(--font-display); font-size: 18px; white-space: nowrap; }
.rate small { font-weight: 600; font-size: 12px; color: var(--muted); font-family: var(--font-body); }
.urgent-edge { border-left: 4px solid var(--spore); }

/* Person card */
.person { display: flex; gap: 12px; align-items: flex-start; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--bg); color: var(--spruce); flex: none; position: relative; border: 1.5px solid var(--line); }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.avatar .dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.meta { color: var(--muted); font-size: 14px; }

.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.filters select { min-height: 44px; padding: 8px 10px; font-size: 14px; }
.count { font-size: 14px; color: var(--muted); }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.empty svg { width: 56px; height: 56px; color: var(--line); }

.phone-line { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-variant-numeric: tabular-nums; font-weight: 700; user-select: all; }

.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: var(--tabbar); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; position: relative; }
.tabbar a.on { color: var(--spruce); }
.tabbar a svg { width: 24px; height: 24px; }
.badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--spore); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }

/* Toast + sheet */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 40; max-width: calc(100% - 32px); }
.sheet-bg { position: fixed; inset: 0; background: rgba(8,14,10,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 22px max(16px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }

.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--spruce); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.foot { text-align: center; font-size: 13px; color: var(--muted); }
.lang-switch { display: inline-flex; gap: 4px; }
.lang-switch button { border: 1.5px solid var(--line); background: transparent; border-radius: 8px; padding: 4px 10px; font-weight: 700; cursor: pointer; font-size: 13px; }
.lang-switch button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Utilities */
.nowrap { flex-wrap: nowrap; }
.nowrap-text { white-space: nowrap; }
.full { width: 100%; }
.faded { opacity: .6; }

/* In-app notification banner (mirrors the phone's own notification) */
.banner {
  position: fixed; z-index: 60; top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
  margin: 0 auto; max-width: 540px; display: flex; gap: 12px; align-items: flex-start; text-align: left;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  padding: 12px 14px; cursor: pointer; box-shadow: 0 10px 30px rgba(10, 30, 20, .18), 0 2px 6px rgba(10, 30, 20, .08);
}
.banner.in { animation: drop .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes drop { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
.banner-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--spruce); color: var(--spruce-ink); display: grid; place-items: center; flex: none; }
.banner-logo svg { width: 22px; height: 22px; }
.banner-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.banner-text strong { font-size: 15px; }

/* Alerts offer */
.alert-card { background: var(--surface); border: 1.5px solid var(--spruce); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.bell { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); color: var(--spruce); display: grid; place-items: center; flex: none; }
.bell.sm { width: 32px; height: 32px; border-radius: 9px; }
.btn svg { flex: none; }

/* Invite */
.invite { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); margin-top: 4px; padding-block-start: 16px; }

/* Founder dashboard */
.north { background: var(--spruce); color: var(--spruce-ink); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.north .label { color: inherit; opacity: .8; }
.north-num { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); }
.north-num b { font-size: 64px; line-height: .9; font-weight: 800; letter-spacing: -0.03em; }
.north-num span { font-size: 22px; opacity: .75; font-weight: 700; }
.meter { height: 10px; border-radius: 10px; background: color-mix(in srgb, var(--spruce-ink) 22%, transparent); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 10px; background: var(--spore); min-width: 4px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile b { font-family: var(--font-display); font-size: 30px; line-height: 1.05; }
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.list-row { display: flex; gap: 10px; align-items: baseline; padding: 12px 14px; border-top: 1px solid var(--line); min-width: 0; flex-wrap: wrap; }
.list-row:first-child { border-top: 0; }

.demo-note { display: flex; gap: 10px; align-items: flex-start; border: 1.5px dashed var(--spore); border-radius: var(--r); padding: 12px 14px; }
.demo-note .tag { flex: none; }
.center { text-align: center; }

.check.adult { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
