@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Manrope:wght@800&display=swap');

/* Light theme. The variable names are older than the palette (--green is the
   accent, --panel-2 the quiet fill); pages use them, so they stay. */
:root {
  --bg: #f3f5f4;
  --panel: #ffffff;
  --panel-2: #f3f5f4;
  --hover: #eef1ef;
  --border: #e4e8e6;
  --border-strong: #dce2df;
  --text: #142019;
  --text-2: #4a5852;
  --muted: #5f6c66;
  --green: #0e7a5a;
  --green-dark: #0e7a5a;
  --green-ink: #0a5c44;
  --green-soft: #e3f3ec;
  --amber: #7a4300;
  --amber-soft: #fff4e0;
  --amber-border: #f2d29a;
  --red: #b42318;
  --red-soft: #fdecea;
  --blue: #0b4a85;
  --blue-soft: #e6f0fa;
  --zoom: #1d4fb8;
  --zoom-soft: #e6eeff;
  --purple: #4a2f94;
  --purple-soft: #eee9fb;
  --shadow: 0 1px 2px rgba(20, 32, 25, .04), 0 6px 20px rgba(20, 32, 25, .05);
  --radius: 20px;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* must win over the display rules below (e.g. .auth-card label) */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body.centered { display: grid; place-items: center; min-height: 100vh; padding: 20px; }

a { color: var(--green-ink); }
a:hover { color: #06402f; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- header ---------- */
header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand h1, .brand-name { font-size: 23px; margin: 0; font-weight: 800; letter-spacing: -.035em; font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif; line-height: 1; }
.logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: #fff; color: #0b5566; border: 1px solid var(--border-strong); box-shadow: 0 1px 2px rgba(20,32,25,.06); /* Luke's mark: teal rings on white */
  display: grid; place-items: center;
}
.logo svg { width: 28px; height: 28px; }
/* The nav scrolls within itself on narrow screens; without this it forces the
   whole page wider than the viewport and the body scrolls sideways. */
header nav {
  display: flex; gap: 4px; margin-left: 18px;
  min-width: 0; max-width: 100%; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
header nav::-webkit-scrollbar { display: none; }
header nav a {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--text-2); text-decoration: none; white-space: nowrap;
}
@media (max-width: 900px) {
  header { padding: 10px 14px; gap: 8px; }
  header nav { margin-left: 0; order: 5; width: 100%; }
  header .who { display: none; }
}
header nav a:hover { background: var(--hover); color: var(--text); }
header nav a.active { background: var(--green-soft); color: var(--green-ink); font-weight: 700; }
.spacer { margin-left: auto; }
.who { font-size: 14px; font-weight: 600; color: var(--text-2); }
.pill {
  padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  background: var(--panel-2); color: var(--muted);
}
.pill.connected { background: var(--green-soft); color: var(--green-ink); }
.pill.waiting_qr, .pill.connecting, .pill.waiting_code, .pill.need_password, .pill.waiting_consent { background: var(--amber-soft); color: var(--amber); }
.pill.disconnected, .pill.logged_out, .pill.error { background: var(--red-soft); color: var(--red); }

/* impersonation banner */
.imp-banner {
  background: #ffe2a8; color: #3d2600;
  padding: 8px 24px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
.imp-banner button {
  margin-left: auto; background: #3d2600; color: #ffe2a8;
  border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 700;
}

/* ---------- layout ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 28px 24px; }
main.split { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { main.split { grid-template-columns: 1fr; } }
@media (max-width: 520px) { main { padding: 18px 14px; } }
.stack { display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 19px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text); margin: 0 0 14px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }

.page-title { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.kicker { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--green-ink); }
.lede { margin: 10px 0 0; font-size: 16.5px; color: var(--text-2); }
@media (max-width: 520px) { .page-title { font-size: 27px; } }

/* ---------- auth card ---------- */
.auth-card { width: 100%; max-width: 400px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 4px 0 18px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.auth-card input {
  display: block; width: 100%; margin-top: 6px;
  font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 11px 13px;
}
.auth-card input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.auth-card .primary { width: 100%; margin-top: 4px; }
.switch { text-align: center; font-size: 14px; color: var(--muted); margin: 14px 0 0; }

/* ---------- bits ---------- */
.qr-box { text-align: center; }
.qr-box img { border-radius: 12px; background: #fff; padding: 8px; max-width: 100%; border: 1px solid var(--border); }
.qr-box p { color: var(--text-2); font-size: 14px; line-height: 1.55; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 90px; background: var(--panel-2); border-radius: 12px; padding: 12px; text-align: center; }
.stat .n { font-size: 22px; font-weight: 800; color: var(--green-ink); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }

.warn {
  background: var(--amber-soft); border: 1px solid var(--amber-border);
  color: var(--amber); border-radius: 12px; padding: 11px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 10px;
}
.warn code { color: var(--text); }
.err {
  background: var(--red-soft); border: 1px solid #f5c2bd;
  color: var(--red); border-radius: 12px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px;
}
.ok-note {
  background: var(--green-soft); border: 1px solid #c3e5d6;
  color: var(--green-ink); border-radius: 12px; padding: 11px 14px; font-size: 14px; line-height: 1.5;
}

ul.recent { list-style: none; margin: 0; padding: 0; font-size: 14px; }
ul.recent li {
  padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
ul.recent li b { color: var(--text); font-weight: 700; }
ul.recent li:last-child { border-bottom: none; }

.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
select, button, input[type=text], input[type=email], input[type=password], input[type=search] {
  font: inherit; font-size: 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text);
  padding: 10px 14px;
}
select { padding-right: 10px; }
input, textarea, select, button { font-family: inherit; }
button { cursor: pointer; font-weight: 600; }
button:hover { background: var(--hover); }
button.primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
button.primary:hover { background: var(--green-ink); border-color: var(--green-ink); }
button:disabled { opacity: .55; cursor: wait; }
button.small { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
button.danger { color: var(--red); }
button.link { background: none; border: none; padding: 0; color: var(--green-ink); font-weight: 700; }
button.link:hover { background: none; text-decoration: underline; }
button.icon { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
button.icon svg { width: 18px; height: 18px; }

.seg { display: inline-flex; gap: 3px; background: var(--hover); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; color: var(--text-2); font-weight: 700; padding: 8px 10px; border-radius: 9px; white-space: nowrap; }
.seg button:hover { background: rgba(255,255,255,.6); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20,32,25,.12); }

.digest-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.digest-list button { font-size: 12.5px; padding: 6px 11px; color: var(--text-2); border-radius: 999px; }
.digest-list button:hover { color: var(--text); }

#output { margin-top: 16px; line-height: 1.6; font-size: 15px; }
#output:empty { display: none; }
#output h1 { font-size: 21px; border-bottom: 1px solid var(--border); padding-bottom: 8px; letter-spacing: -.02em; }
#output h2 { font-size: 16.5px; color: var(--green-ink); margin-top: 22px; }
#output h3 { font-size: 15px; margin-bottom: 4px; }
#output li { margin: 3px 0; }
#output hr { border: none; border-top: 1px solid var(--border); }
.meta { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--border); font-weight: 700;
}
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--text-2);
}
.tag.admin, .tag.connected { background: var(--green-soft); color: var(--green-ink); }
.tag.pending { background: var(--amber-soft); color: var(--amber); }
.tag.rejected, .tag.logged_out { background: var(--red-soft); color: var(--red); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.scroll-x { overflow-x: auto; }
.log-line { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---------- powered by ---------- */
.powered {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  padding: 22px 16px 30px;
  letter-spacing: .02em;
}
.powered b { color: var(--text); font-weight: 700; }
.powered a { color: inherit; text-decoration: none; }
.powered a:hover b { color: var(--green-ink); }
.auth-card + .powered { padding-bottom: 0; }

/* ---------- What's new: the release-note card and the full page ---------- */
.wn-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 32, 25, .35); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  animation: wn-fade .18s ease-out;
}
@keyframes wn-fade { from { opacity: 0 } to { opacity: 1 } }
.wn-modal {
  width: min(720px, 100%); max-height: min(84vh, 820px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 24px 70px rgba(20, 32, 25, .22); overflow: hidden;
  animation: wn-rise .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes wn-rise { from { transform: translateY(14px); opacity: 0 } to { transform: none; opacity: 1 } }
.wn-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; }
.wn-head h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.02em; }
.wn-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-ink); }
.wn-x { margin-left: auto; background: none; border: none; color: var(--muted);
  font-size: 15px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.wn-x:hover { color: var(--text); background: var(--hover); }
.wn-scroll { overflow-y: auto; padding: 0 24px 4px; }
.wn-entry + .wn-entry { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 18px; }
.wn-entry h3 { margin: 0 0 6px; font-size: 16px; }
.wn-foot { display: flex; align-items: center; gap: 12px; padding: 14px 24px 18px;
  border-top: 1px solid var(--border); background: var(--panel); }
.wn-foot a { color: var(--muted); font-size: 14px; text-decoration: none; }
.wn-foot a:hover { color: var(--green-ink); }
.wn-ok { margin-left: auto; background: var(--green); border: none; color: #fff;
  font-weight: 700; font-size: 14px; border-radius: 12px; padding: 10px 22px; cursor: pointer; }
.wn-ok:hover { background: var(--green-ink); }

/* release-note body copy, shared by the card and the full page */
.wn-body, .entry .body { font-size: 15px; line-height: 1.65; color: var(--text); }
.wn-body p, .entry .body p { margin: 8px 0; }
.wn-body strong, .entry .body strong { color: var(--text); }
.wn-body code, .entry .body code {
  background: var(--panel-2); border-radius: 5px; padding: 1px 5px; font-size: 13px;
}
.wn-body img, .entry .body img {
  display: block; width: 100%; height: auto; margin: 12px 0;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel-2);
}

@media (max-width: 520px) {
  .wn-overlay { padding: 0; place-items: stretch; }
  .wn-modal { max-height: 100%; border-radius: 0; border: none; width: 100%; }
}


/* ---------- connected accounts ---------- */
.src-row { padding: 12px 0; border-top: 1px solid var(--border); }
.src-row:first-child { border-top: 0; padding-top: 0; }
.src-head { display: flex; align-items: center; gap: 10px; }
.src-head b { font-size: 15px; }
.src-head .pill { margin-left: auto; }
.src-dot { width: 10px; height: 10px; border-radius: 999px; flex: 0 0 auto; background: #fff; border: 2px solid #9aa7a1; }
.src-dot.on { background: var(--green); border-color: var(--green); }
.src-row img { display: block; margin: 10px 0; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--border); }
.src-row input[type=password] { flex: 1; min-width: 0; }
.src-row .controls { margin-top: 8px; }
.src-row .controls:empty { display: none; }
.src-code { font: 700 26px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 3px; margin: 6px 0; color: var(--green-ink); }

/* source tag (chat list, calendar, needs-you) */
.src-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; margin-right: 5px; vertical-align: 1px; background: var(--green-soft); color: var(--green-ink); }
.src-tag.telegram { background: #e4f0fb; color: #0b5394; }
.src-tag.outlook { background: var(--blue-soft); color: var(--blue); }
.src-tag.zoom { background: var(--zoom-soft); color: var(--zoom); }
.src-tag.sms { background: #e8f0fe; color: #1a57c2; }
.src-tag.teams { background: var(--purple-soft); color: var(--purple); }

/* ---------- proposal card (Calendar's booking form) ---------- */
.answer { background: var(--panel); color: var(--text); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.answer .heard { font-size: 13px; color: var(--muted); }
.answer .heard b { color: var(--text-2); font-weight: 600; }
.answer .reply { font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; }
.proposal { border: 1px solid var(--border); background: #f6f8f7; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.proposal .label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.proposal .title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.proposal textarea { width: 100%; min-height: 80px; resize: vertical; font: inherit; font-size: 14.5px; line-height: 1.5; border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 12px; }

.alert {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--amber-soft); border: 1px solid var(--amber-border); color: var(--amber);
  border-radius: 14px; padding: 12px 16px; font-size: 14px; line-height: 1.5; margin-bottom: 12px;
}
.alert svg { width: 20px; height: 20px; flex: 0 0 auto; }
.alert p { margin: 0; flex: 1 1 260px; }

/* ---------- calendar ---------- */
.cal-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-top .page-title { flex: 1 1 auto; font-size: 30px; margin-left: 4px; }
.cal-layout { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.cal-layout > .card { flex: 999 1 600px; min-width: 0; }
.cal-layout > aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.dayview { position: relative; }
.dayview .hr { position: absolute; left: 0; right: 0; display: flex; align-items: flex-start; }
.dayview .hr span { width: 60px; flex: 0 0 auto; text-align: right; padding-right: 12px; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: -8px; }
.dayview .hr i { flex: 1; border-top: 1px solid #edf0ee; }
.dayview .lanes { position: absolute; left: 60px; right: 0; top: 0; bottom: 0; }
.blk {
  position: absolute; border-radius: 10px; overflow: hidden;
  display: flex; align-items: flex-start; gap: 8px; padding: 5px 6px 5px 10px;
  background: var(--blue-soft); color: var(--blue); border: 1px solid #c6dcf1;
}
.blk.short { align-items: center; padding: 0 4px 0 10px; }
.blk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; color: inherit; text-decoration: none; }
.blk-main:hover { color: inherit; text-decoration: underline; }
.blk b { font-size: 13px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk-join {
  flex: 0 0 auto; background: var(--green); color: #fff; text-decoration: none;
  font-size: 12px; font-weight: 800; line-height: 1; padding: 5px 10px; border-radius: 7px;
}
.blk-join:hover { background: var(--green-ink); color: #fff; }
.blk.short .blk-join { padding: 3px 9px; }
.blk.zoom { background: var(--zoom-soft); color: var(--zoom); border-color: #c7d7fb; }
.blk.teams { background: var(--purple-soft); color: var(--purple); border-color: #d8cef5; }
.blk.past { background: #f1f3f2; color: var(--text-2); border-color: var(--border); }
.blk.clash:not(.past) { box-shadow: inset 0 0 0 1.5px #e0a23b; }
.nowline { position: absolute; left: -6px; right: 0; display: flex; align-items: center; pointer-events: none; }
.nowline i { width: 11px; height: 11px; border-radius: 999px; background: #c2410c; }
.nowline b { flex: 1; height: 2px; background: #c2410c; }
.allday { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px 60px; }
.allday span { padding: 4px 10px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 700; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.month .wd { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.month button { height: 38px; border: 0; padding: 0; border-radius: 999px; background: transparent; font-size: 13.5px; font-weight: 500; color: var(--text); position: relative; }
.month button:hover { background: var(--hover); }
.month button.other { color: #9aa7a1; }
.month button.today { color: var(--green-ink); font-weight: 800; }
.month button.sel { background: var(--green); color: #fff; font-weight: 800; }
.month button.has::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 9px; background: var(--green); }
.month button.sel.has::after { background: #fff; }

.upnext .day { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 0 4px; border-top: 1px solid var(--border); }
.upnext .day:first-child { border-top: 0; padding-top: 0; }
.upnext .row { display: flex; gap: 12px; align-items: center; padding: 7px 0; font-size: 14px; }
.upnext .row b { width: 76px; flex: 0 0 auto; }
.upnext .row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bookbox { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--green); border-radius: 14px; padding: 5px 5px 5px 14px; }
.bookbox input { flex: 1; min-width: 0; border: 0; padding: 8px 0; font-size: 15px; background: transparent; }
.bookbox input:focus { outline: none; }
.bookbox button { width: 44px; height: 44px; border-radius: 11px; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; padding: 0; flex: 0 0 auto; }
.bookbox button:hover { background: var(--green-ink); }
.bookbox button svg { width: 20px; height: 20px; }
.bookbox button.rec { background: #c2410c; }

.cal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cal-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.cal-form .full { grid-column: 1 / -1; }
.cal-form .checks { flex-direction: row; gap: 16px; align-items: center; color: var(--text); flex-wrap: wrap; }
.cal-form .checks label { flex-direction: row; align-items: center; gap: 7px; color: var(--text); font-size: 14px; }
@media (max-width: 640px) { .cal-form { grid-template-columns: 1fr; } }
.cal-form input, .cal-form textarea, .cal-form select {
  font: inherit; font-size: 14.5px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--panel); color: var(--text); padding: 9px 12px; min-width: 0; width: 100%; box-sizing: border-box;
}
.cal-form input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--green); }
.cal-form textarea { resize: vertical; }

/* ---------- icons ---------- */
.ico { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -.125em; }
.icon-btn, .mic { display: inline-grid; place-items: center; }
.icon-btn .ico, .mic .ico { width: 20px; height: 20px; }
.setup-note .ico { width: 18px; height: 18px; color: var(--green-ink); }
.prio { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #fff; background: var(--red); border-radius: 999px; padding: 1px 7px; vertical-align: 1px; }
.acc-name { display: inline-flex; align-items: center; gap: 8px; }
.src-badge { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.src-badge .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.src-badge.whatsapp { background: #1f9d55; }
.src-badge.telegram { background: #2481cc; }
.src-badge.outlook { background: #0b4a85; }
.src-badge.zoom { background: #1d4fb8; }
.src-badge.sms, .src-badge.gmessages { background: #1a73e8; }

/* phone: one slim row for the logo + status, the menu scrolls underneath */
@media (max-width: 900px) {
  header { padding: 8px 12px 6px; gap: 8px; }
  header .who { display: none; }
  .logo { width: 30px; height: 30px; border-radius: 9px; }
  .logo svg { width: 24px; height: 24px; }
  .brand h1, .brand-name { font-size: 21px; }
  header .pill { padding: 3px 9px; font-size: 12px; }
  #logout { padding: 5px 10px; font-size: 12.5px; }
  header nav { margin-top: 2px; }
  header nav a { padding: 7px 12px; font-size: 13.5px; }
  .install-btn { padding: 5px 10px; font-size: 12.5px; }
}
/* the menu has grown; drop the name before the header wraps */
@media (max-width: 1400px) { header .who { display: none; } }

/* ---------- navigation (js/nav.js): bottom bar on a phone / tablet, side bar on a computer ---------- */
.luke-bar, .luke-rail { display: none; }
.ln-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; font: inherit; cursor: pointer; text-decoration: none;
  color: var(--muted); font-size: 11.5px; font-weight: 700; padding: 0; -webkit-tap-highlight-color: transparent; }
.ln-item:hover { color: var(--text); }
.ln-item .ln-ico { display: grid; place-items: center; width: 54px; height: 30px; border-radius: 15px; }
.ln-item svg { width: 22px; height: 22px; }
.ln-item.on { color: var(--green); font-weight: 800; }
.ln-item.on .ln-ico { background: var(--green-soft); }
.ln-ask { color: var(--green); font-weight: 800; }
.ln-ask .ln-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff;
  border: 4px solid var(--panel); box-shadow: 0 8px 20px rgba(14,122,90,.32); }
.ln-ask.on .ln-ico { background: var(--green-ink); }
.ln-ask:hover { color: var(--green-ink); }
.ln-badge { position: absolute; top: -4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--green); color: #fff; font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--panel); line-height: 1; }
.ln-badge.dark { background: #3a4741; }
.ln-badge.red { background: var(--red); }
.ln-dot { position: absolute; top: 0; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--panel); }
.ln-dot.green { background: var(--green); }
.ln-dot.static { position: static; margin-left: auto; border: none; }

/* your initials (header on a phone, bottom of the side bar) with a connection dot */
.ln-me { position: relative; width: 36px; height: 36px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: var(--green-soft); color: var(--green-ink); font: inherit; font-weight: 800; font-size: 13px;
  display: grid; place-items: center; flex-shrink: 0; }
.ln-me.big { width: 48px; height: 48px; font-size: 16px; cursor: default; }
.ln-status { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--panel); background: transparent; display: none; }
.ln-status[data-st=ok] { display: block; background: #1f9d6a; }
.ln-status[data-st=wait] { display: block; background: #d98a00; }
.ln-status[data-st=bad] { display: block; background: var(--red); }

/* More */
.ln-sheet { position: fixed; inset: 0; z-index: 90; background: rgba(20,32,25,.28); }
.ln-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 85dvh; overflow-y: auto;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -10px 40px rgba(20,32,25,.18);
  animation: ln-up .18s ease-out; }
.ln-panel::before { content: ''; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); }
@keyframes ln-up { from { transform: translateY(24px); opacity: .4; } }
.ln-who { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; }
.ln-who b { display: block; font-size: 16.5px; }
.ln-who small { display: block; color: var(--text-2); font-size: 13px; margin-top: 1px; }
.ln-group { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.ln-row { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 16px; border: none; background: none;
  font: inherit; font-size: 15.5px; font-weight: 700; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; width: 100%; }
.ln-group .ln-row + .ln-row { border-top: 1px solid var(--hover); }
.ln-row:hover, .ln-row.on { background: #f6faf8; color: var(--text); }
.ln-row svg { width: 21px; height: 21px; color: var(--green); flex-shrink: 0; }
.ln-row > span { flex-grow: 1; }
.ln-tag { flex-grow: 0 !important; font-size: 12.5px; font-weight: 800; color: var(--text-2); }
.ln-tag.red { background: var(--red-soft); color: var(--red); padding: 2px 9px; border-radius: 999px; }
.ln-out { justify-content: center; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; color: var(--red); }
.ln-out > span { flex-grow: 0; }
.ln-out svg { color: var(--red); }

@media (max-width: 900px) {
  body.has-nav { padding-bottom: var(--nav-h, 70px); }
  body.has-nav > header .ln-me { margin-left: 4px; }
  body.has-nav > header .spacer { margin-left: auto; }
  .luke-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    align-items: flex-end; justify-content: space-around; gap: 2px;
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-top: 1px solid var(--border); }
  .luke-bar .ln-item { flex: 1 1 0; min-width: 0; }
  .luke-bar .ln-ask { margin-top: -24px; }
  .luke-bar .ln-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  /* the keyboard is up: the reply box sits on it */
  body.has-nav.kb { padding-bottom: 0; }
  body.has-nav.kb .luke-bar { display: none; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .luke-bar { justify-content: center; gap: 10px; }
  .luke-bar .ln-item { flex: 0 0 84px; }
}
@media (min-width: 901px) {
  body.has-nav { padding-left: 88px; }
  body.has-nav > header { display: none; }
  .luke-rail { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 88px; z-index: 60;
    flex-direction: column; align-items: center; gap: 8px; padding: 14px 0 16px; overflow-y: auto;
    background: var(--panel); border-right: 1px solid var(--border); scrollbar-width: none; }
  .luke-rail .ln-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 8px;
    background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 1px 2px rgba(20,32,25,.06); }
  .luke-rail .ln-logo svg { width: 32px; height: 32px; }
  .luke-rail .ln-item { width: 80px; }
  .luke-rail .ln-ask .ln-ico { width: 52px; height: 52px; border-width: 0; box-shadow: 0 6px 16px rgba(14,122,90,.28); }
  .luke-rail .ln-grow { flex-grow: 1; }
  .luke-rail .ln-me { width: 40px; height: 40px; margin-top: 4px; }
  .ln-panel { left: 98px; right: auto; bottom: 12px; width: 340px; border-radius: 18px; padding: 14px; animation: none;
    box-shadow: 0 12px 40px rgba(20,32,25,.2); }
  .ln-panel::before { display: none; }
  .ln-sheet { background: transparent; }
}
