/* Pass: team tasks, meetings and deadlines
   Colour tokens. Change brand colours here only. */
:root {
  --pepper: #1E2B2F;      /* main text, dark surfaces */
  --pepper-2: #2C3B40;
  --salt: #F4F6F4;        /* page background */
  --paper: #FFFFFF;       /* tickets, cards */
  --herb: #2E7A66;        /* main action, done */
  --herb-dark: #235F50;
  --herb-soft: #E3F0EC;
  --saffron: #E9A23B;     /* due soon */
  --saffron-soft: #FBF0DC;
  --chili: #C2453A;       /* overdue */
  --chili-soft: #F8E4E1;
  --line: #DCE3DF;
  --muted: #5E6E6A;
  --rail: #9AA7A3;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --shadow-ticket: 0 1px 0 rgba(30, 43, 47, .06), 0 8px 18px -10px rgba(30, 43, 47, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--salt);
  color: var(--pepper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--herb-dark); }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: 0 1.25rem;
  border-radius: var(--r-md); border: 1px solid transparent;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--herb); color: #fff; }
.btn-primary:hover { background: var(--herb-dark); }
.btn-ghost { background: transparent; color: var(--pepper); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pepper); }
.btn-dark { background: var(--pepper); color: #fff; }
.btn-dark:hover { background: var(--pepper-2); }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; }

/* ---------- brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--pepper); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--pepper);
  display: grid; place-items: center;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font: 700 1.25rem/1 var(--font-display); }
.brand-sub { font-size: .8rem; color: var(--muted); line-height: 1.2; }

/* ---------- site header ---------- */
.site-header {
  max-width: 1180px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header nav { display: flex; gap: 10px; align-items: center; }

/* ---------- landing hero ---------- */
.hero {
  max-width: 1180px; margin: 0 auto; padding: 40px 24px 72px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero-copy p.lead { font-size: 1.15rem; color: var(--muted); margin-top: 18px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--muted); }

/* ticket rail: the kitchen pass, where every order is clipped up and called off */
.rail-board {
  background: var(--pepper); border-radius: var(--r-lg);
  padding: 26px 22px 30px; color: #fff; position: relative; overflow: hidden;
}
.rail-board h3 { color: #fff; font-size: 1rem; font-weight: 600; }
.rail-board .rail-date { color: #B9C6C2; font-size: .88rem; }
.rail {
  margin-top: 18px; height: 10px; border-radius: 5px;
  background: linear-gradient(#C9D2CF, #8E9C98);
  position: relative;
}
.tickets {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: -4px; align-items: start;
}
.ticket {
  background: var(--paper); color: var(--pepper);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  padding: 16px 12px 14px; box-shadow: var(--shadow-ticket);
  position: relative; font-size: .86rem; line-height: 1.4;
  transform-origin: top center;
}
.ticket::before { /* clip on the rail */
  content: ""; position: absolute; top: -8px; left: 50%; width: 26px; height: 12px;
  transform: translateX(-50%); background: #6F7D79; border-radius: 3px;
}
.ticket::after { /* torn bottom edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: radial-gradient(circle at 6px 0, var(--paper) 5px, transparent 5.5px) 0 0 / 12px 6px repeat-x;
}
.ticket:nth-child(2) { transform: rotate(1.2deg); }
.ticket:nth-child(3) { transform: rotate(-0.8deg); }
.ticket .t-dept { font-size: .74rem; color: var(--muted); }
.ticket .t-title { font-weight: 650; margin: 4px 0 8px; font-size: .95rem; }
.ticket .t-who { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ticket .t-time { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; }
.stamp {
  position: absolute; right: 10px; bottom: 44px; background: var(--paper);
  border: 2px solid var(--herb); color: var(--herb);
  font: 700 .8rem/1 var(--font-display); padding: 5px 8px; border-radius: 6px;
  transform: rotate(-12deg) scale(1.6); opacity: 0;
}
.ticket.is-done .stamp { animation: stamp .45s cubic-bezier(.2,.9,.3,1.3) 1.1s forwards; }
@keyframes stamp { to { opacity: 1; transform: rotate(-12deg) scale(1); } }

.rail-summary {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; font-size: .9rem; color: #D5DEDB;
}
.rail-summary strong { color: #fff; font-family: var(--font-display); font-size: 1.15rem; margin-right: 4px; }

/* ---------- landing sections ---------- */
.band { max-width: 1180px; margin: 0 auto; padding: 56px 24px; }
.band-head { max-width: 60ch; margin-bottom: 28px; }
.band-head p { margin-top: 10px; color: var(--muted); }

.cadence {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); overflow: hidden;
}
.cadence > div { padding: 24px; }
.cadence > div + div { border-left: 1px solid var(--line); }
.cadence .when { font: 600 .9rem/1.2 var(--font-body); color: var(--herb-dark); margin-bottom: 10px; display:flex; align-items:center; gap:8px; }
.cadence .when svg { width: 18px; height: 18px; }
.cadence p { color: var(--muted); margin-top: 8px; }

.roles { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.role { padding: 24px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); }
.role.owner { background: var(--herb-soft); border-color: #C5DED6; }
.role ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.role li + li { margin-top: 4px; }

.app-strip {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px;
}
.app-strip p { color: var(--muted); margin-top: 6px; max-width: 52ch; }

.site-footer {
  max-width: 1180px; margin: 0 auto; padding: 28px 24px 40px; color: var(--muted); font-size: .9rem;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line);
}

/* Android visitors see this banner on the landing page */
.android-banner {
  display: none; position: sticky; top: 0; z-index: 20;
  background: var(--pepper); color: #fff; padding: 10px 16px; font-size: .92rem;
  align-items: center; justify-content: space-between; gap: 12px;
}
.android-banner.show { display: flex; }
.android-banner a { color: #fff; font-weight: 600; white-space: nowrap; }

/* ---------- login ---------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-form-side { display: flex; flex-direction: column; padding: 28px 40px; }
.auth-form-wrap { margin: auto; width: 100%; max-width: 400px; padding: 32px 0; }
.auth-form-wrap h1 { font-size: 2rem; }
.auth-form-wrap > p { color: var(--muted); margin-top: 8px; }
.field { margin-top: 20px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper);
  font: 400 1rem var(--font-body); color: var(--pepper);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--herb); box-shadow: 0 0 0 3px var(--herb-soft); }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.pw-wrap { position: relative; }
.pw-wrap button {
  position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px;
  background: none; border: 0; color: var(--herb-dark); font: 600 .9rem var(--font-body); cursor: pointer;
}
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 22px; font-size: .95rem; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--herb); }
.form-error {
  display: none; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--chili-soft); color: #8E2C23; font-size: .95rem;
}
.form-error.show { display: block; }
.auth-side {
  background: var(--pepper); color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.auth-side .pepper-big { width: 150px; height: 150px; margin-bottom: 26px; }
.auth-side h2 { color: #fff; max-width: 18ch; }
.auth-side p { color: #C3CFCB; margin-top: 12px; max-width: 40ch; }
.speech {
  margin-top: 26px; background: var(--pepper-2); border-radius: var(--r-md) var(--r-md) var(--r-md) 4px;
  padding: 14px 16px; max-width: 360px; color: #E7EEEC; font-size: .95rem;
}

/* ---------- app shell (dashboard) ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--pepper); color: #DCE5E2; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { color: #fff; padding: 0 8px; }
.sidebar .brand-mark { background: var(--herb); }
.sidebar .brand-sub { color: #9FB0AB; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  color: #DCE5E2; text-decoration: none; font-weight: 500;
}
.nav a svg { width: 20px; height: 20px; opacity: .85; }
.nav a:hover { background: var(--pepper-2); }
.nav a[aria-current="page"] { background: var(--herb); color: #fff; }
.nav .count { margin-left: auto; font-size: .78rem; background: rgba(255,255,255,.14); padding: 2px 8px; border-radius: 20px; }
.sidebar .me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-top: 1px solid #34464B; }
.sidebar .me small { display: block; color: #9FB0AB; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font: 700 .8rem/1 var(--font-body); color: #fff; background: var(--herb);
}
.avatar.sm { width: 24px; height: 24px; font-size: .66rem; }

.main { padding: 24px 32px 120px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.topbar p { color: var(--muted); margin-top: 6px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper);
  display: grid; place-items: center; cursor: pointer; position: relative; color: var(--pepper);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--chili); border: 2px solid var(--paper); }

.stat-line {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 22px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.stat-line > div { padding: 16px 22px; flex: 1 1 150px; }
.stat-line > div + div { border-left: 1px solid var(--line); }
.stat-line b { display: block; font: 700 1.7rem/1.1 var(--font-display); }
.stat-line span { color: var(--muted); font-size: .9rem; }
.stat-line .warn b { color: #B5761B; }
.stat-line .bad b { color: var(--chili); }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; margin-top: 22px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-body { padding: 8px 20px 16px; }

.tabs { display: inline-flex; background: var(--salt); border-radius: 9px; padding: 3px; }
.tabs button {
  border: 0; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer;
  font: 600 .88rem var(--font-body); color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--pepper); box-shadow: 0 1px 2px rgba(30,43,47,.12); }

.filter { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: 500 .9rem var(--font-body); background: var(--paper); color: var(--pepper); }

.task {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.task:last-child { border-bottom: 0; }
.tick {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--rail); background: var(--paper);
  display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff;
}
.tick svg { width: 16px; height: 16px; opacity: 0; }
.task.done .tick { background: var(--herb); border-color: var(--herb); }
.task.done .tick svg { opacity: 1; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-title { font-weight: 600; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--muted); margin-top: 3px; align-items: center; }
.task-meta .who { display: inline-flex; align-items: center; gap: 6px; }
.pill { font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pill.soon { background: var(--saffron-soft); color: #8A5A12; }
.pill.late { background: var(--chili-soft); color: #8E2C23; }
.pill.ok { background: var(--herb-soft); color: var(--herb-dark); }
.pill.plain { background: var(--salt); color: var(--muted); }
.row-actions { display: flex; gap: 2px; }
.row-actions button { width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.row-actions button:hover { background: var(--salt); color: var(--pepper); }
.row-actions svg { width: 18px; height: 18px; }

.meeting { display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.meeting:last-child { border-bottom: 0; }
.meeting .time { font: 700 1rem/1.2 var(--font-display); }
.meeting .time small { display: block; font: 500 .78rem var(--font-body); color: var(--muted); }
.meeting .m-kind { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.empty { padding: 26px 4px; color: var(--muted); }

/* reminder pop-up (before a deadline or meeting) */
.reminder {
  position: fixed; top: 20px; left: 50%; transform: translate(-50%, -140%); z-index: 60;
  width: min(460px, calc(100% - 32px));
  background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--saffron);
  border-radius: var(--r-md); box-shadow: 0 18px 40px -16px rgba(30,43,47,.5);
  padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.reminder.show { transform: translate(-50%, 0); }
.reminder svg { width: 24px; height: 24px; color: #B5761B; }
.reminder .r-actions { grid-column: 2; display: flex; gap: 8px; margin-top: 8px; }
.reminder .r-actions .btn { min-height: 38px; padding: 0 14px; font-size: .9rem; }

/* dialog for add / edit task */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100% - 32px)); box-shadow: 0 30px 60px -20px rgba(30,43,47,.55); }
dialog::backdrop { background: rgba(30, 43, 47, .45); }
dialog form { padding: 22px 24px 24px; }
dialog .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- phone screens ---------- */
.phone-page { background: #E6EBE8; min-height: 100vh; display: flex; justify-content: center; }
.phone {
  width: 100%; max-width: 430px; min-height: 100vh; background: var(--salt);
  position: relative; display: flex; flex-direction: column;
}
@media (min-width: 600px) {
  .phone-page { align-items: center; padding: 24px 0; }
  .phone { min-height: 860px; height: 860px; border-radius: 40px; overflow: hidden; border: 10px solid var(--pepper); box-shadow: 0 30px 70px -30px rgba(30,43,47,.6); }
}
.phone-scroll { flex: 1; overflow-y: auto; padding: 0 18px 110px; }
.status-bar { height: 38px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; font-size: .8rem; font-weight: 600; }

.welcome { flex: 1; display: flex; flex-direction: column; background: var(--pepper); color: #fff; padding: 0 24px 28px; }
.welcome .status-bar { padding: 0; color: #fff; }
.welcome-art { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.welcome-art .pepper-big { width: 128px; height: 128px; margin-bottom: 28px; }
.welcome h1 { color: #fff; font-size: 2.2rem; }
.welcome p { color: #C3CFCB; margin-top: 12px; font-size: 1.05rem; }
.welcome .btn-ghost { color: #fff; border-color: #4A5D62; }
.welcome .stack { display: grid; gap: 10px; }
.welcome .fine { text-align: center; font-size: .85rem; color: #9FB0AB; margin-top: 14px; }

.m-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 14px; }
.m-header h1 { font-size: 1.55rem; }
.m-header p { font-size: .92rem; color: var(--muted); }
.m-section { margin-top: 18px; }
.m-section h2 { font-size: 1.1rem; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.m-section h2 a { font: 600 .88rem var(--font-body); text-decoration: none; }
.m-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 4px 16px; }
.next-up {
  background: var(--pepper); color: #fff; border-radius: var(--r-lg); padding: 18px; margin-top: 4px;
}
.next-up .when { color: #F2C47C; font-weight: 600; font-size: .9rem; }
.next-up h3 { color: #fff; font-size: 1.2rem; margin-top: 6px; }
.next-up p { color: #C3CFCB; font-size: .92rem; margin-top: 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip { flex: none; border: 1px solid var(--line); background: var(--paper); padding: 7px 14px; border-radius: 20px; font: 600 .88rem var(--font-body); color: var(--muted); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--pepper); border-color: var(--pepper); color: #fff; }

.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px 14px; z-index: 5;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .74rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--herb-dark); }
.fab {
  position: absolute; right: 18px; bottom: 86px; width: 54px; height: 54px; border-radius: 16px;
  background: var(--herb); color: #fff; border: 0; display: grid; place-items: center; z-index: 6;
  box-shadow: 0 10px 22px -10px rgba(35,95,80,.8); cursor: pointer;
}
.fab svg { width: 24px; height: 24px; }
.m-login { flex: 1; display: flex; flex-direction: column; padding: 0 24px 28px; }
.m-login .status-bar { padding: 0; }
.m-login-top { padding: 30px 0 8px; }
.m-login-top .pepper-big { width: 76px; height: 76px; margin-bottom: 20px; }
.m-login h1 { font-size: 1.9rem; }
.m-login .sub { color: var(--muted); margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 20px; }
  .roles { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; overflow-x: auto; }
  .sidebar .nav { flex-direction: row; }
  .sidebar .nav a span.lbl { display: none; }
  .sidebar .me, .nav .count { display: none; }
  .main { padding: 20px 16px 120px; }
}
@media (max-width: 720px) {
  .cadence { grid-template-columns: 1fr; }
  .cadence > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .tickets { grid-template-columns: 1fr 1fr; }
  .tickets .ticket:nth-child(3) { display: none; }
  .app-strip { grid-template-columns: 1fr; }
  .site-header { padding: 14px 16px; }
  .site-header .hide-sm { display: none; }
  .hero, .band { padding-left: 16px; padding-right: 16px; }
  .auth-form-side { padding: 20px 16px; }
  .stat-line > div + div { border-left: 0; }
  .stat-line > div { flex: 1 1 45%; }
  .task { grid-template-columns: auto 1fr; }
  .task .row-actions { grid-column: 2; }
  dialog .two { grid-template-columns: 1fr; }
}

/* ---------- Pepper assistant ---------- */
.pepper { position: fixed; right: 20px; bottom: 20px; z-index: 50; font-family: var(--font-body); }
.pepper-launch {
  width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer; padding: 6px;
  background: var(--paper); box-shadow: 0 12px 28px -10px rgba(30,43,47,.55), 0 0 0 1px var(--line);
  position: relative; transition: transform .2s;
}
.pepper-launch:hover { transform: translateY(-2px); }
.pepper-face { width: 100%; height: 100%; }
.pepper-face .pepper-eyes, .pepper-avatar .pepper-eyes { transform-origin: 60px 53px; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.pepper-tip {
  position: absolute; right: 78px; top: 50%; transform: translateY(-50%);
  background: var(--pepper); color: #fff; font-size: .85rem; font-weight: 600; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.pepper-launch:hover .pepper-tip, .pepper-launch:focus-visible .pepper-tip { opacity: 1; }
.pepper.is-open .pepper-launch { display: none; }

.pepper-panel {
  width: 380px; height: min(580px, calc(100vh - 40px));
  background: var(--paper); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(30,43,47,.55), 0 0 0 1px var(--line);
  display: flex; flex-direction: column;
  animation: pop .22s cubic-bezier(.2,.8,.2,1);
}
.pepper-panel[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.pepper-panel header {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px;
  background: var(--pepper); color: #fff;
}
.pepper-avatar { width: 40px; height: 40px; background: #fff; border-radius: 50%; padding: 3px; }
.pepper-panel header b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.pepper-panel header small { color: #B9C6C2; font-size: .8rem; }
.pepper-x { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; }
.pepper-x:hover { background: var(--pepper-2); }
.pepper-x svg { width: 18px; height: 18px; }
.pepper-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--salt); }
.pm { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: .94rem; line-height: 1.45; }
.pm.bot { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.pm.me { background: var(--herb); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.pm ul { margin: 6px 0 0; padding-left: 18px; }
.pm li + li { margin-top: 4px; }
.pm.typing { display: flex; gap: 4px; padding: 14px; }
.pm.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--rail); animation: dots 1s infinite; }
.pm.typing span:nth-child(2) { animation-delay: .15s; }
.pm.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { opacity: .3; transform: translateY(-2px); } }
.pepper-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 0; background: var(--paper); border-top: 1px solid var(--line); }
.pepper-chips button {
  flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 16px; padding: 6px 11px;
  font: 600 .82rem var(--font-body); color: var(--herb-dark); cursor: pointer;
}
.pepper-chips button:hover { border-color: var(--herb); }
.pepper-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--paper); }
.pepper-form input { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 22px; padding: 0 16px; font: 400 .95rem var(--font-body); }
.pepper-form input:focus { outline: none; border-color: var(--herb); }
.pepper-form button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--herb); color: #fff; cursor: pointer; display: grid; place-items: center; }
.pepper-form button svg { width: 20px; height: 20px; }

/* on phone screens the chat opens as a full-width sheet */
@media (max-width: 520px) {
  .pepper { right: 14px; bottom: 14px; }
  .pepper.is-open { left: 0; right: 0; bottom: 0; }
  .pepper-panel { width: 100%; height: 82vh; border-radius: 18px 18px 0 0; }
}
/* inside the phone frame, Pepper sits above the tab bar */
.phone .pepper { position: absolute; right: 16px; bottom: 86px; }
.phone .pepper.is-open { left: 0; right: 0; bottom: 0; }
.phone .pepper-panel { width: 100%; height: 82%; max-height: 700px; border-radius: 18px 18px 0 0; }
.phone .pepper-launch { width: 56px; height: 56px; }
.phone .pepper.is-open { top: auto; height: 100%; display: flex; align-items: flex-end; background: rgba(30,43,47,.35); }

/* on wide screens the reminder slides in at the top right, under the buttons */
@media (min-width: 981px) {
  body > .reminder { left: auto; right: 28px; top: 84px; transform: translateX(130%); }
  body > .reminder.show { transform: translateX(0); }
}
.reminder .r-actions { flex-wrap: wrap; } .reminder .r-actions .btn { white-space: nowrap; }

/* ---------- sign in: phone, code, fingerprint ---------- */
.signin { width: 100%; }
.signin .step[hidden] { display: none; }
.signin h1 { font-size: 2rem; }
.signin .sub { color: var(--muted); margin-top: 8px; }
.signin .sub b { color: var(--pepper); }
.phone-input { display: flex; gap: 8px; }
.phone-input .cc {
  flex: none; min-height: 48px; padding: 0 12px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); font-weight: 600; color: var(--muted);
}
.otp { display: flex; gap: 8px; margin-top: 20px; }
.otp input {
  width: 100%; max-width: 54px; height: 58px; text-align: center; font: 700 1.5rem var(--font-display);
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); color: var(--pepper);
}
.otp input:focus { outline: none; border-color: var(--herb); box-shadow: 0 0 0 3px var(--herb-soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--herb-dark); font: 600 .95rem var(--font-body); cursor: pointer; text-decoration: underline; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.demo-note { margin-top: 16px; padding: 10px 12px; border-radius: var(--r-md); background: var(--saffron-soft); color: #6E4810; font-size: .88rem; }
.step-actions { display: grid; gap: 10px; margin-top: 24px; }

.fp-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 26px 0 6px; }
.fp {
  width: 132px; height: 132px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background: var(--herb-soft); color: var(--herb-dark); display: grid; place-items: center;
}
.fp svg { width: 70px; height: 70px; }
.fp::after { /* ring that runs while the phone reads the finger */
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 4px solid transparent; border-top-color: var(--herb);
  opacity: 0;
}
.fp.scanning::after { opacity: 1; animation: spin .9s linear infinite; }
.fp.ok { background: var(--herb); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.fp-wrap p { margin-top: 14px; color: var(--muted); font-size: .95rem; min-height: 1.5em; }
.fp-wrap p.good { color: var(--herb-dark); font-weight: 600; }
.fp-wrap p.bad { color: #8E2C23; }
.methods { display: flex; justify-content: center; gap: 18px; margin-top: 4px; font-size: .88rem; color: var(--muted); }
.methods span { display: inline-flex; align-items: center; gap: 6px; }
.methods svg { width: 18px; height: 18px; }
.welcome-back { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.welcome-back small { display: block; color: var(--muted); }
.steps-dots { display: flex; gap: 6px; margin-bottom: 18px; }
.steps-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.steps-dots i.on { background: var(--herb); }

/* ---------- Pepper mascot image ---------- */
img.pepper-img { object-fit: contain; }
.pepper-launch { padding: 9px; overflow: hidden; background: #fff; }
.pepper-launch img.pepper-face { width: 100%; height: 100%; object-fit: contain; }
.pepper-avatar { overflow: hidden; }
img.pepper-avatar { object-fit: contain; padding: 4px; }

/* landing: meet Pepper */
.meet {
  display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px 40px;
}
.meet img { width: 100%; max-width: 300px; height: auto; }
.meet h2 { max-width: 22ch; }
.meet > div > p { color: var(--muted); margin-top: 10px; max-width: 54ch; }
.asks { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.asks span {
  background: var(--salt); border: 1px solid var(--line); padding: 8px 14px; font-size: .95rem;
  border-radius: 16px 16px 16px 4px;
}
@media (max-width: 720px) {
  .meet { grid-template-columns: 1fr; padding: 24px 20px; gap: 18px; justify-items: start; }
  .meet img { max-width: 200px; }
}
/* on dark screens the mascot sits in a round light badge */
.auth-side img.pepper-big, .welcome img.pepper-big, .m-login-top img.pepper-big {
  border-radius: 50%; background: #FFF3E3; object-fit: cover; object-position: 50% 18%;
}

/* ---------- phone: tab bar with Pepper in the middle ---------- */
.pepper.no-launch .pepper-launch { display: none; }
.tabbar { grid-template-columns: repeat(5, 1fr); align-items: end; }
.tab-pepper {
  border: 0; background: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font: 600 .74rem var(--font-body); color: var(--pepper); margin-top: -26px;
}
.tp-ring {
  width: 62px; height: 62px; border-radius: 50%; display: block; overflow: hidden;
  background: #fff; border: 4px solid var(--paper);
  box-shadow: 0 8px 18px -8px rgba(30,43,47,.55);
}
.tp-ring img.tp-face { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.tp-ring svg.tp-face { width: 100%; height: 100%; padding: 6px; }

/* phone page bits */
.m-top { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 12px; }
.m-top h1 { font-size: 1.6rem; }
.m-group { font: 600 .85rem var(--font-body); color: var(--muted); margin: 16px 2px 6px; }
.m-group.late { color: var(--chili); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #E6EBE8; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 8px 6px; border-radius: 8px; font: 600 .88rem var(--font-body); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--pepper); box-shadow: 0 1px 2px rgba(30,43,47,.12); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row small { display: block; color: var(--muted); font-size: .86rem; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 14px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--herb); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 8px 0 6px; }
.profile-head .avatar { width: 58px; height: 58px; font-size: 1.1rem; }
.meet-done { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 10px; font: 600 .82rem var(--font-body); color: var(--herb-dark); cursor: pointer; }
.meet-done[aria-pressed="true"] { background: var(--herb); border-color: var(--herb); color: #fff; }

/* phone welcome: light, logo in the centre */
.welcome-light { flex: 1; display: flex; flex-direction: column; padding: 0 24px 28px; text-align: center; background: linear-gradient(#FFF7EC, var(--salt) 70%); }
.welcome-light .status-bar { padding: 0; }
.welcome-light .center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.welcome-light .logo-big { width: 230px; height: auto; margin-bottom: 26px; }
.welcome-light h1 { font-size: 1.9rem; max-width: 14ch; }
.welcome-light p { color: var(--muted); margin-top: 10px; max-width: 28ch; }
.welcome-light .fine { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* brand mark with the Pepper face */
.brand-mark.has-img { background: #fff; overflow: hidden; }
.brand-mark.has-img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.welcome-light p { margin-left: auto; margin-right: auto; }
/* phone sign in: logo, dots and heading centred; the form stays full width */
.m-login .signin .step > h1, .m-login .signin .step > .sub { text-align: center; }
.m-login .signin .steps-dots { justify-content: center; }
.m-login .signin .welcome-back { text-align: left; }
.m-login-top img.pepper-big { width: 88px; height: 88px; }
[hidden] { display: none !important; }
.reminder:not(.show) { visibility: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s .35s; }

/* ---------- sign in: setup code extras ---------- */
.signin .or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--muted); font-size: .9rem; }
.signin .or::before, .signin .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.qr-wrap { display: grid; place-items: center; margin: 22px 0 6px; }
.qr { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px; background: #fff; }
.pill.checked { background: #E4ECF6; color: #2C4F7C; }

/* ---------- admin ---------- */
.btn-sm { min-height: 36px; padding: 0 .8rem; font-size: .9rem; border-radius: 8px; gap: .35rem; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-danger { background: var(--chili); color: #fff; }
.btn-danger:hover { background: #A63A30; }
.btn-ghost.danger { color: #8E2C23; }
.btn-ghost.danger:hover { border-color: var(--chili); }
.nav a.nav-quiet { margin-top: 14px; color: #9FB0AB; font-size: .92rem; }
.admin-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tools input.filter { min-width: 210px; }

.alist { padding: 0 8px 8px; }
.arow { display: grid; gap: 14px; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.arow:last-child { border-bottom: 0; }
.arow small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.arow.ahead { padding-top: 12px; padding-bottom: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.people-cols { grid-template-columns: minmax(140px, 1.4fr) minmax(100px, 1fr) 150px 262px; gap: 12px; }
.people-cols .late-text { color: #8E2C23; font-weight: 600; }
.task-cols { grid-template-columns: minmax(220px, 2fr) 1.2fr 150px 160px 112px; }
.arow.is-left { opacity: .62; }
.arow.is-done .t-title { color: var(--muted); }
.who-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-cell b { display: block; }
.arow .who { display: inline-flex; align-items: center; gap: 8px; }
.cell-label { display: none; }
.row-btns { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.code-chip {
  border: 1px dashed var(--herb); background: var(--herb-soft); color: var(--herb-dark);
  font: 700 1rem/1 var(--font-body); letter-spacing: .12em; padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.big-code {
  margin: 20px 0 6px; padding: 18px; text-align: center; border-radius: var(--r-md);
  background: var(--salt); border: 1px dashed var(--herb);
  font: 700 2.4rem/1 var(--font-display); letter-spacing: .14em; color: var(--pepper);
}
.code-steps { margin: 16px 0 0; padding-left: 1.2em; color: var(--muted); font-size: .94rem; }
.code-steps li + li { margin-top: 4px; }
dialog .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
dialog .three .field { margin-top: 10px; }

.verify {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--pepper); font: 600 .88rem var(--font-body);
}
.verify svg { width: 17px; height: 17px; }
.verify:hover { border-color: #2C4F7C; }
.verify.on { background: #E4ECF6; border-color: #B9CBE2; color: #2C4F7C; }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 22px; }
.dept-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dept-line b { text-align: right; }
.rep-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.rep-times div { background: var(--salt); border-radius: 8px; padding: 10px; }
.rep-times small { display: block; color: var(--muted); font-size: .8rem; }
.rep-times b { font-size: .95rem; }

.log-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row small { display: block; color: var(--muted); font-size: .84rem; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--pepper); color: #fff; padding: 12px 18px; border-radius: var(--r-md); font-weight: 600;
  transition: opacity .2s, transform .2s; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .arow.ahead { display: none; }
  .people-cols, .task-cols { grid-template-columns: 1fr 1fr; gap: 10px 14px; align-items: start; }
  .people-cols > :first-child, .task-cols > :first-child, .arow .row-btns { grid-column: 1 / -1; }
  .arow .row-btns { justify-content: flex-start; }
  .cell-label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 3px; }
  .admin-tools input.filter { min-width: 0; flex: 1; }
}
@media (max-width: 520px) {
  dialog .three { grid-template-columns: 1fr; }
  .big-code { font-size: 2rem; }
}

/* ---------- Pepper: moves and moods ---------- */
.pepper-spark { width: 9px; height: 9px; border-radius: 50%; pointer-events: none; z-index: 70; }
.pepper-ghost { border-radius: 50%; pointer-events: none; }
.tab-pepper { position: relative; --tone: var(--herb); }
.tab-pepper.tone-saffron { --tone: var(--saffron); }
.tab-pepper.tone-sky { --tone: #4F7FB8; }
.tab-pepper.tone-chili { --tone: var(--chili); }
.tab-pepper .tp-ring { border-color: var(--paper); box-shadow: 0 0 0 3px var(--tone), 0 10px 20px -8px rgba(30,43,47,.55); }
.tp-badge {
  position: absolute; top: -4px; right: calc(50% - 38px); width: 24px; height: 24px; border-radius: 50%;
  background: var(--tone); color: #fff; display: grid; place-items: center; border: 2px solid var(--paper);
}
.tp-badge svg { width: 13px; height: 13px; }
.tp-bubble {
  position: absolute; left: 50%; bottom: 96px; transform: translate(-50%, 8px) scale(.85); opacity: 0; pointer-events: none;
  background: var(--pepper); color: #fff; border: 0; border-radius: 14px; padding: 8px 13px; white-space: nowrap;
  font: 600 .86rem var(--font-body); cursor: pointer; box-shadow: 0 10px 22px -10px rgba(30,43,47,.6);
  transition: opacity .2s, transform .35s cubic-bezier(.2,1.4,.4,1);
}
.tp-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--pepper); }
.tp-bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }

/* little moves, one per page, every few seconds */
.move-wave .tp-ring.idle { animation: pWave 1.1s ease-in-out; transform-origin: 50% 90%; }
.move-bob .tp-ring.idle  { animation: pBob 1.2s ease-in-out; }
.move-hop .tp-ring.idle  { animation: pHop .9s cubic-bezier(.3,.7,.4,1); }
.move-tilt .tp-ring.idle { animation: pTilt 1.4s ease-in-out; }
@keyframes pWave { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-10deg); } 80% { transform: rotate(6deg); } }
@keyframes pBob  { 0%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } 60% { transform: translateY(1px); } }
@keyframes pHop  { 0%,100% { transform: translateY(0) scale(1); } 15% { transform: translateY(2px) scale(1.1,.9); } 45% { transform: translateY(-16px) scale(.95,1.05); } 75% { transform: translateY(1px) scale(1.06,.94); } }
@keyframes pTilt { 0%,100% { transform: rotate(0) scale(1); } 35% { transform: rotate(-12deg) scale(1.06); } 70% { transform: rotate(4deg); } }

/* chat sheet on the phone: springs up, slides down */
.phone .pepper.is-open { animation: pFade .25s ease; }
.phone .pepper-panel { animation: pSheet .55s cubic-bezier(.16,1.22,.4,1); }
.phone .pepper.closing { animation: pFade .23s ease reverse forwards; }
.phone .pepper.closing .pepper-panel { animation: pSheetOut .23s ease-in forwards; }
@keyframes pFade { from { background: rgba(30,43,47,0); } }
@keyframes pSheet { from { transform: translateY(100%); } }
@keyframes pSheetOut { to { transform: translateY(100%); } }
.pepper.closing:not(.phone .pepper) .pepper-panel { animation: pSheetOut .23s ease-in forwards; }
.pepper.tone-saffron .pepper-avatar { box-shadow: 0 0 0 3px var(--saffron); }
.pepper.tone-sky .pepper-avatar { box-shadow: 0 0 0 3px #4F7FB8; }
.pepper.tone-chili .pepper-avatar { box-shadow: 0 0 0 3px var(--chili); }
.pepper.tone-herb .pepper-avatar { box-shadow: 0 0 0 3px #86E3C9; }
@media (prefers-reduced-motion: reduce) { .tp-bubble { transition: none; } }

/* ---------- Pepper: action cards ---------- */
.pm.act { padding: 0; background: none; border: 0; max-width: 92%; }
.act-card { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--herb); border-radius: 14px; padding: 12px 14px; }
.act-card.done { border-left-color: var(--herb); background: #F7FBF9; }
.act-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; color: var(--herb-dark); }
.act-head svg { width: 18px; height: 18px; }
.act-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: .92rem; }
.act-card dt { color: var(--muted); }
.act-card dd { margin: 0; font-weight: 600; }
.act-btns { display: flex; gap: 8px; margin-top: 12px; }
.act-btns button { min-height: 38px; padding: 0 14px; border-radius: 9px; font: 600 .9rem var(--font-body); cursor: pointer; border: 1px solid var(--line); background: var(--paper); color: var(--pepper); }
.act-btns .act-yes { background: var(--herb); color: #fff; border-color: var(--herb); }
.act-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--herb-dark); }
.act-state svg { width: 16px; height: 16px; }
.act-state.no { color: var(--muted); }

/* ---------- Pepper: voice notes ---------- */
.pepper-voice { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid #4A5D62; background: none; color: #C3CFCB; font: 600 .78rem var(--font-body); cursor: pointer; }
.pepper-voice svg { width: 16px; height: 16px; }
.pepper-voice[aria-pressed="true"] { background: var(--herb); border-color: var(--herb); color: #fff; }
.pepper-voice + .pepper-x { margin-left: 4px; }
.pm.vn-wrap { padding: 8px 10px; min-width: 220px; }
.vn { display: flex; align-items: center; gap: 10px; --tint: var(--herb); }
.pm.me .vn { --tint: #fff; }
.vn-play { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--tint); color: var(--paper); }
.pm.me .vn-play { color: var(--herb); }
.vn-play svg { width: 16px; height: 16px; }
.vn-bars { flex: 1; height: 26px; display: flex; align-items: center; gap: 2px; }
.vn-bars i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--tint); opacity: .35; }
.vn.playing .vn-bars i { animation: vnPulse .5s ease-in-out infinite alternate; }
.vn.playing .vn-bars i:nth-child(3n) { animation-delay: .15s; }
.vn.playing .vn-bars i:nth-child(3n+1) { animation-delay: .3s; }
@keyframes vnPulse { to { opacity: .95; transform: scaleY(1.15); } }
.vn-time { font-size: .78rem; opacity: .8; min-width: 30px; text-align: right; }
.vn-text { font-size: .84rem; margin-top: 6px; opacity: .85; line-height: 1.4; }
.pm.bot .vn-text { color: var(--muted); }
.pm.bot .vn-text ul { margin-top: 2px; }
.vn-pick { display: grid; gap: 6px; margin-top: 8px; }
.vn-pick button { text-align: left; border: 1px solid var(--line); background: var(--salt); border-radius: 10px; padding: 8px 10px; font: 500 .86rem var(--font-body); cursor: pointer; color: var(--pepper); }

.pepper-mic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--salt); color: var(--pepper); cursor: pointer; display: grid; place-items: center; flex: none; }
.pepper-mic svg { width: 21px; height: 21px; }
.pepper-rec { display: none; flex: 1; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 14px; border-radius: 22px; background: var(--chili-soft); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--chili); animation: recBlink 1s infinite; }
@keyframes recBlink { 50% { opacity: .25; } }
.rec-time { font-weight: 700; font-size: .9rem; color: #8E2C23; }
.rec-bars { flex: 1; height: 22px; display: flex; align-items: center; gap: 2px; }
.rec-bars i { flex: 1; border-radius: 2px; background: var(--chili); opacity: .6; animation: vnPulse .45s ease-in-out infinite alternate; }
.rec-bars i:nth-child(2n) { animation-delay: .2s; }
.rec-cancel { border: 0; background: none; color: #8E2C23; font: 600 .85rem var(--font-body); cursor: pointer; padding: 6px; }
.pepper-form.recording input, .pepper-form.recording .pepper-send { display: none; }
.pepper-form.recording .pepper-rec { display: flex; }
.pepper-form.recording .pepper-mic { background: var(--chili); color: #fff; animation: micPulse 1.2s ease-out infinite; }
@keyframes micPulse { 0% { box-shadow: 0 0 0 0 rgba(194,69,58,.5); } 100% { box-shadow: 0 0 0 14px rgba(194,69,58,0); } }

/* message card on Today */
.msg-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: #FFF7EA; border: 1px solid #F1DDB8; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.msg-card small { color: #8A5A12; font-weight: 600; font-size: .8rem; }
.msg-card p { margin: 2px 0 0; font-weight: 600; }

/* ---------- web: To do and Progress ---------- */
.todo-block { margin-top: 26px; }
.todo-block h2 { font-size: 1.25rem; margin-bottom: 10px; }
.ttable { padding: 0 8px; }
.trow { display: grid; gap: 14px; align-items: center; padding: 13px 12px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.trow.thead { font-size: .82rem; font-weight: 600; color: var(--muted); padding-top: 12px; padding-bottom: 9px; background: var(--salt); margin: 0 -8px; padding-left: 20px; padding-right: 20px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.todo-cols { grid-template-columns: minmax(220px, 2fr) 1fr 1.2fr 110px; }
.todo-cols-boss { grid-template-columns: minmax(200px, 1.8fr) 1.2fr 1fr 1.2fr 110px; }
.meet-cols { grid-template-columns: minmax(200px, 2fr) 1fr 1.3fr 1.2fr; }
.person-cols { grid-template-columns: minmax(200px, 2fr) 90px 90px 140px 90px; }
.trow .who { display: inline-flex; align-items: center; gap: 8px; }
.open-d { color: var(--herb-dark); }
.due-d.late, .due-d.late small { color: #8E2C23; }
.due-d.soon small { color: #8A5A12; font-weight: 600; }
.due-d.late small { font-weight: 600; }

.dept-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.dept-tabs button { border: 1px solid var(--line); background: var(--paper); border-radius: 20px; padding: 7px 14px; font: 600 .9rem var(--font-body); color: var(--pepper); cursor: pointer; }
.dept-tabs button[aria-selected="true"] { background: var(--pepper); border-color: var(--pepper); color: #fff; }
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.meter { padding: 20px 22px 22px; }
.meter + .meter { border-left: 1px solid var(--line); }
.meter h3 { font-size: 1rem; }
.meter-big { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 14px; }
.meter-big b { font: 700 2.2rem/1 var(--font-display); }
.meter-big span { color: var(--muted); }
.meter-bar { display: flex; gap: 2px; height: 14px; }
.meter-bar i { border-radius: 4px; min-width: 6px; cursor: default; }
.meter-key { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: .92rem; }
.meter-key li { display: flex; align-items: center; gap: 8px; }
.meter-key b { margin-left: auto; }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.s-done { background: var(--herb); }
.s-open { background: #B9C6C2; }
.s-late { background: var(--chili); }
.s-warn { background: var(--saffron); }
.meter-bar .none { background: var(--line); }
.chart-tip { position: fixed; z-index: 70; transform: translate(-50%, -100%); background: var(--pepper); color: #fff; font-size: .84rem; font-weight: 600; padding: 6px 9px; border-radius: 7px; pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; }
.chart-tip.show { opacity: 1; }
@media (max-width: 980px) {
  .trow.thead { display: none; }
  .todo-cols, .todo-cols-boss, .meet-cols, .person-cols { grid-template-columns: 1fr 1fr; gap: 8px 14px; align-items: start; }
  .trow > :first-child { grid-column: 1 / -1; }
  .trow .cell-label { display: block; font-size: .76rem; color: var(--muted); }
  .prog-grid { grid-template-columns: 1fr; }
  .meter + .meter { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- phone: To do and Progress ---------- */
.m-back { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.m-back h1 { text-align: center; }
.back-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--pepper); background: var(--paper); border: 1px solid var(--line); }
.back-btn svg { width: 20px; height: 20px; }
.count-pill { font: 600 .8rem var(--font-body); background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; color: var(--muted); }
.todo-card { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid #B9C6C2; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; transition: opacity .35s, transform .35s; }
.todo-card.late { border-left-color: var(--chili); }
.todo-card.soon { border-left-color: var(--saffron); }
.todo-card.leaving { opacity: 0; transform: translateX(40px); }
.tc-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tc-top b { font-size: 1rem; line-height: 1.35; }
.tc-done { width: 34px; height: 34px; flex: none; border-radius: 10px; border: 2px solid var(--line); background: var(--paper); color: transparent; display: grid; place-items: center; cursor: pointer; }
.tc-done svg { width: 18px; height: 18px; }
.tc-done:hover { border-color: var(--herb); color: var(--herb); }
.tc-who { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .86rem; color: var(--muted); }
.tc-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; font-size: .9rem; }
.tc-dates small { display: block; color: var(--muted); font-size: .76rem; }
.tc-left { margin-top: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.todo-card.late .tc-left { color: #8E2C23; }
.todo-card.soon .tc-left { color: #8A5A12; }
.chip-row { display: flex; gap: 6px; overflow-x: auto; margin: 12px -18px 0; padding: 0 18px 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row button { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 7px 13px; font: 600 .86rem var(--font-body); color: var(--pepper); cursor: pointer; }
.chip-row button[aria-pressed="true"] { background: var(--pepper); border-color: var(--pepper); color: #fff; }
.m-meters { padding: 0; }
.m-meters .meter { padding: 16px; }
.m-meters .meter + .meter { border-left: 0; border-top: 1px solid var(--line); }
.m-meters .meter-big b { font-size: 1.9rem; }
.person-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.person-row small { display: block; color: var(--muted); font-size: .82rem; }
.sum-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.sum-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; text-decoration: none; color: var(--pepper); display: grid; gap: 2px; }
.sum-card small { color: var(--muted); font-size: .8rem; font-weight: 600; }
.sum-card b { font: 700 1.7rem/1.1 var(--font-display); }
.sum-card span { font-size: .84rem; color: var(--muted); }
.sum-card em.late { font-style: normal; color: #8E2C23; font-weight: 600; }
.mini-bar { display: block; height: 8px; border-radius: 4px; background: #DCE3DF; overflow: hidden; margin-top: 6px; }
.mini-bar i { display: block; height: 100%; background: var(--herb); border-radius: 4px; }

/* ---------- task kinds, fixed tasks, performance ---------- */
.ktag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.ktag svg { width: 12px; height: 12px; }
.ktag.fixed { background: #E7ECF3; color: #34507A; }
.ktag.given { background: #F3EEE4; color: #6E5A33; }
.ktag.personal { background: var(--salt); color: var(--muted); border: 1px solid var(--line); }
.seg4 { grid-template-columns: repeat(4, 1fr); }
.seg.seg4 { display: grid; }
.r-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; cursor: pointer; width: 100%; text-align: left; border: 0; background: none; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--pepper); font: inherit; }
.r-row:last-child { border-bottom: 0; }
.r-row b { display: block; }
.r-row small { display: block; color: var(--muted); font-size: .84rem; }
.r-row .r-when { color: #34507A; font-weight: 600; margin-top: 2px; }
.r-row.paused { opacity: .55; }
.r-lock { width: 34px; height: 34px; border-radius: 10px; background: #E7ECF3; color: #34507A; display: grid; place-items: center; }
.r-lock svg { width: 17px; height: 17px; }
.link-row { text-decoration: none; color: var(--pepper); }
.link-row > span { font-size: 1.4rem; color: var(--muted); }
.perf-card { padding: 16px; }
.perf-head { display: flex; justify-content: space-between; align-items: baseline; }
.perf-head span { color: var(--muted); font-size: .86rem; }
.pie-wrap { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; margin-top: 12px; }
.pie { width: 140px; height: 140px; }
.pie circle { transition: stroke-width .15s; }
.pie circle:hover { stroke-width: 24; }
.pie-big { font: 700 26px var(--font-display); fill: var(--pepper); }
.pie-small { font: 600 11px var(--font-body); fill: var(--muted); }
.trend-title { font-size: .92rem; margin-top: 18px; }
.trend { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin-top: 10px; padding-bottom: 18px; position: relative;
  background: linear-gradient(to top, transparent 17px, var(--line) 17px, var(--line) 18px, transparent 18px) , linear-gradient(to top, transparent calc(18px + 50% - 9px), #EEF2F0 calc(18px + 50% - 9px), #EEF2F0 calc(18px + 50% - 8px), transparent calc(18px + 50% - 8px)); }
.tb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.tb i { width: 100%; max-width: 22px; background: var(--herb); border-radius: 4px 4px 0 0; opacity: .85; }
.tb:last-child i { opacity: 1; }
.tb:hover i { opacity: 1; }
.tb small { position: absolute; bottom: -18px; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.tb-v { font-size: .74rem; font-weight: 700; color: var(--pepper); margin-bottom: 3px; white-space: nowrap; }
.perf-note { font-size: .84rem; margin-top: 10px; }

/* ---------- easier to use: bigger targets, undo, tips, photos ---------- */
.phone .tick { width: 34px; height: 34px; border-radius: 10px; }
.phone .tick svg { width: 19px; height: 19px; }
.phone .tick { position: relative; }
.phone .tick::after { content: ""; position: absolute; inset: -8px; }          /* bigger hit area than it looks */
.task.just-done .tick { background: var(--herb); border-color: var(--herb); transform: scale(1.12); transition: transform .2s; }
.task.just-done .tick svg { opacity: 1; }
.task.just-done .task-title { text-decoration: line-through; color: var(--muted); transition: color .2s; }
.phone .row-actions button { width: 40px; height: 40px; }
html.big-text { font-size: 18px; }
html.big-text body { font-size: 18px; }
html.big-text .task-title { font-size: 1.05rem; }
html.big-text .tabbar a { font-size: .8rem; }
.m-group { display: flex; justify-content: space-between; align-items: center; }
.m-group span { font-size: .78rem; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 0 8px; color: var(--muted); }
.task-dates { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.task-dates b { font-weight: 600; color: var(--pepper); }
.ktag.photo { background: #FFF3E3; color: #8A5A12; }
.task-photo { margin-top: 8px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: 84px; height: 62px; cursor: zoom-in; background: none; }
.task-photo img { width: 100%; height: 100%; object-fit: cover; }
.only-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: var(--chili-soft); color: #8E2C23; font-weight: 600; font-size: .9rem; }

.snack { position: absolute; left: 14px; right: 14px; bottom: 96px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--pepper); color: #fff; border-radius: 14px; padding: 12px 10px 12px 16px; font-weight: 600; box-shadow: 0 14px 28px -12px rgba(30,43,47,.6);
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s; }
.snack.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.snack button { border: 0; background: none; color: #86E3C9; font: 700 .95rem var(--font-body); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.snack button:hover { background: var(--pepper-2); }

.quick-due { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-due button { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 8px 12px; font: 600 .88rem var(--font-body); color: var(--pepper); cursor: pointer; min-height: 38px; }
.quick-due button[aria-pressed="true"] { background: var(--herb); border-color: var(--herb); color: #fff; }
.due-preview { font-size: .86rem; color: var(--herb-dark); font-weight: 600; margin-top: 8px; min-height: 1.2em; }
.photo-take { position: relative; margin-top: 18px; cursor: pointer; }
.photo-view img { width: 100%; border-radius: 12px; display: block; }
.photo-view p { margin-top: 10px; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; font-size: .95rem; cursor: pointer; }
.check-row input { width: 22px; height: 22px; accent-color: var(--herb); }
.r-preview { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--herb-soft); color: var(--herb-dark); font-size: .9rem; font-weight: 600; line-height: 1.45; }
.r-when svg { width: 13px; height: 13px; display: inline; vertical-align: -2px; }

.intro { position: absolute; inset: 0; z-index: 60; background: rgba(30,43,47,.55); display: flex; align-items: flex-end; animation: pFade .25s ease; }
.intro.leaving { opacity: 0; transition: opacity .25s; }
.intro-card { background: var(--paper); width: 100%; border-radius: 24px 24px 0 0; padding: 30px 24px 26px; text-align: center; animation: pSheet .45s cubic-bezier(.16,1.22,.4,1); }
.intro-ic { width: 86px; height: 86px; margin: 0 auto 16px; border-radius: 50%; background: var(--herb-soft); color: var(--herb); display: grid; place-items: center; overflow: hidden; }
.intro-ic svg { width: 42px; height: 42px; }
.intro-ic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.intro-card h2 { font-size: 1.45rem; }
.intro-card p { color: var(--muted); margin-top: 8px; font-size: 1rem; }
.intro-dots { display: flex; justify-content: center; gap: 6px; margin: 20px 0 18px; }
.intro-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.intro-dots i.on { background: var(--herb); width: 22px; border-radius: 4px; }
.intro-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

.pepper-form { position: relative; }
.mic-hint { position: absolute; right: 50px; bottom: 58px; background: var(--pepper); color: #fff; font: 600 .78rem var(--font-body); padding: 6px 10px; border-radius: 8px; white-space: nowrap; animation: pop .3s; }
.mic-hint::after { content: ""; position: absolute; right: 14px; bottom: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--pepper); }

/* Pepper button on wide screens: same ring colour and small move as the phone tab */
.pepper { --tone: #86E3C9; }
.pepper.tone-saffron { --tone: var(--saffron); }
.pepper.tone-sky { --tone: #4F7FB8; }
.pepper.tone-chili { --tone: var(--chili); }
.pepper-launch { box-shadow: 0 0 0 3px var(--tone), 0 12px 28px -10px rgba(30,43,47,.55); }
.tab-pepper.tone-herb { --tone: var(--herb); }
.move-wave .pepper-launch.idle { animation: pWave 1.1s ease-in-out; transform-origin: 50% 90%; }
.move-bob .pepper-launch.idle  { animation: pBob 1.2s ease-in-out; }
.move-hop .pepper-launch.idle  { animation: pHop .9s cubic-bezier(.3,.7,.4,1); }
.move-tilt .pepper-launch.idle { animation: pTilt 1.4s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .pepper-launch.idle, .tp-ring.idle { animation: none !important; } }

/* fixed tasks: a visible Edit on every row (the whole row opens the edit box) */
.r-edit { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; font: 600 .86rem var(--font-body); color: var(--pepper); background: var(--paper); }
.r-edit svg { width: 15px; height: 15px; }
.r-row:hover .r-edit, .r-row:focus-visible .r-edit { border-color: var(--herb); color: var(--herb); }
