:root {
  --ink: #17383a;
  --ink-soft: #315356;
  --paper: #fffdf8;
  --canvas: #f3f0e9;
  --line: #dedbd2;
  --muted: #6f7772;
  --green: #77a58b;
  --green-soft: #dce8df;
  --coral: #ef765b;
  --amber: #e2a93b;
  --blue: #7994a5;
  --purple: #9b8ec4;
  --pink: #c9849b;
  --danger: #b94c3d;
  --shadow: 0 18px 50px rgba(23, 56, 58, .08);
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(119, 165, 139, .12), transparent 30rem),
    var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 4.6rem); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2.5vw, 2rem); font-weight: 500; line-height: 1.1; letter-spacing: -.025em; }
h3 { margin-bottom: 6px; font-size: 1rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: -100px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid rgba(23, 56, 58, .1);
  background: rgba(243, 240, 233, .92);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.brand-mark { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--ink); color: #fffdf8; font-family: Georgia, serif; font-size: 1.3rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.nav-link { min-height: 42px; padding: 10px 13px; display: inline-flex; align-items: center; border-radius: 12px; color: var(--muted); font-size: .86rem; font-weight: 650; text-decoration: none; }
.nav-link:hover, .nav-link.active { background: var(--paper); color: var(--ink); }
.sync-pill { min-height: 34px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255, 253, 248, .6); font-size: .72rem; white-space: nowrap; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.sync-pill.synced .sync-dot { background: var(--green); }
.sync-pill.offline .sync-dot, .sync-pill.error .sync-dot { background: var(--coral); }
.sync-pill.syncing .sync-dot { animation: pulse 1s infinite; }
.avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--ink); font-size: .72rem; font-weight: 800; }
.nav-toggle { display: none; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); font-size: .8rem; }
.text-button { min-height: 40px; padding: 8px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .8rem; }
.text-button:hover { color: var(--ink); }
.mobile-nav { display: none; }

.eyebrow { margin-bottom: 9px; color: var(--green); font-size: .7rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.lede { max-width: 48rem; color: var(--muted); font-size: 1.02rem; }

.workspace {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 80px) 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}
.tracker-panel { min-width: 0; }
.tracker-panel > h1 { max-width: 700px; }
.loading-card {
  min-height: 160px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, .7);
  color: var(--muted);
}
.spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .25; } }

.activity-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.activity-card {
  min-height: 90px;
  padding: 16px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, .76);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.activity-card:hover { transform: translateY(-2px); border-color: var(--activity-color, var(--green)); background: var(--paper); }
.activity-card:focus-visible, .stop-button:focus-visible, .primary-button:focus-visible, .secondary-button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(239, 118, 91, .28); outline-offset: 3px; }
.activity-mark { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--activity-color, var(--green)) 55%, white); border-radius: 14px; background: color-mix(in srgb, var(--activity-color, var(--green)) 22%, white); color: var(--ink); font-size: .72rem; font-weight: 900; }
.activity-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.activity-copy strong { font-size: .9rem; }
.activity-copy small { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.start-arrow { color: var(--muted); font-size: 1.25rem; }
.more-button { margin-top: 12px; padding: 10px 0; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: .82rem; font-weight: 750; }

.running-card { margin-top: 28px; overflow: hidden; border-radius: 25px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.running-main { padding: clamp(24px, 5vw, 46px); text-align: center; }
.running-label { display: inline-flex; align-items: center; gap: 9px; color: rgba(255,255,255,.75); font-size: .78rem; font-weight: 750; }
.running-label .activity-mark { width: 38px; height: 38px; border: 0; }
.running-clock { margin: 20px 0 7px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(3rem, 11vw, 6.4rem); font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: -.07em; line-height: 1; }
.running-since { color: rgba(255,255,255,.58); font-size: .78rem; }
.stage-area { padding: 19px 24px; border-top: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04); }
.stage-area > span { display: block; margin-bottom: 10px; color: rgba(255,255,255,.58); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stage-area > span small { margin-left: 5px; color: rgba(255,255,255,.42); font-size: .61rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.stage-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stage-chip { min-height: 38px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: transparent; color: rgba(255,255,255,.72); cursor: pointer; font-size: .72rem; }
.stage-chip.selected { border-color: var(--amber); background: var(--amber); color: var(--ink); font-weight: 800; }
.stop-area { padding: 18px 24px 25px; }
.stop-button { width: 100%; min-height: 58px; border: 0; border-radius: 16px; background: var(--coral); color: #fff; cursor: pointer; font-weight: 850; box-shadow: 0 8px 24px rgba(239, 118, 91, .25); }
.stop-button:hover { filter: brightness(1.04); }
.timer-warning { margin: 12px 0 0; color: #ffd2c7; font-size: .75rem; text-align: center; }

.privacy-note { margin: 24px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .75rem; }
.privacy-note span { color: var(--green); }
.notice { margin-top: 16px; padding: 12px 14px; border: 1px solid #c9dccf; border-radius: 12px; background: #edf5ef; color: var(--ink-soft); font-size: .8rem; }
.notice.warning { border-color: #f1c8bd; background: #fff0eb; color: #7f3428; }

.today-card { position: sticky; top: 102px; overflow: hidden; border: 1px solid rgba(23,56,58,.08); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.today-head { padding: 24px 24px 18px; border-bottom: 1px solid var(--line); }
.today-head span { color: var(--muted); font-size: .72rem; }
.today-head strong { margin-top: 3px; display: block; font-family: Georgia, serif; font-size: 2.4rem; font-weight: 500; }
.today-head small { color: var(--muted); }
.summary-bar { height: 9px; margin-top: 16px; display: flex; overflow: hidden; border-radius: 99px; background: #eceae3; }
.summary-bar span { height: 100%; }
.summary-list { padding: 18px 24px 22px; display: grid; gap: 12px; }
.summary-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: .78rem; }
.summary-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--row-color); }
.summary-row span { color: var(--muted); }
.summary-row b { font-variant-numeric: tabular-nums; }
.next-meeting { margin: 0 18px 18px; padding: 16px; border-radius: 15px; background: #edf2ee; }
.next-meeting strong { display: block; margin: 3px 0; font-size: .82rem; }
.next-meeting > span:last-child { color: var(--muted); font-size: .72rem; }
.loading-lines { min-height: 300px; padding: 28px; display: grid; align-content: center; gap: 14px; }
.loading-lines span { height: 12px; border-radius: 10px; background: linear-gradient(90deg, #ece9e1, #f8f6f0, #ece9e1); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.loading-lines span:nth-child(2) { width: 72%; }
.loading-lines span:nth-child(3) { width: 88%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.auth-layout { min-height: 100vh; padding: clamp(28px, 7vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: clamp(40px, 10vw, 140px); align-items: center; background: radial-gradient(circle at 15% 20%, rgba(119,165,139,.18), transparent 32rem); }
.auth-intro { max-width: 650px; }
.auth-brand { margin-bottom: clamp(45px, 9vh, 100px); }
.auth-intro p:not(.eyebrow) { max-width: 540px; color: var(--muted); font-size: 1.05rem; }
.auth-card { padding: clamp(24px, 4vw, 42px); display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.auth-card h2 { margin-bottom: 15px; }
label { color: var(--ink-soft); font-size: .76rem; font-weight: 750; }
input, select { width: 100%; min-height: 47px; padding: 10px 12px; border: 1px solid #d2d1c9; border-radius: 11px; background: #fff; color: var(--ink); }
input { margin: 2px 0 10px; }
select { cursor: pointer; }
.password-field { position: relative; }
.password-field input { padding-right: 66px; }
.reveal-button { position: absolute; right: 7px; top: 8px; min-height: 34px; padding: 5px 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .72rem; }
.primary-button, .secondary-button, .primary-link { min-height: 48px; padding: 11px 17px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer; font-weight: 800; text-decoration: none; }
.primary-button { border: 1px solid var(--ink); background: var(--ink); color: white; }
.primary-button:hover { background: #244a4d; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .5; }
.secondary-button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.primary-button.compact, .secondary-button.compact { min-height: 40px; padding: 8px 13px; font-size: .72rem; }
.secondary-button.danger { border-color: #e2b5aa; color: #8e392c; }
.auth-link { width: fit-content; margin-top: 4px; color: var(--ink-soft); font-size: .75rem; font-weight: 750; }
.form-message { min-height: 20px; margin: 4px 0 0; color: var(--green); font-size: .77rem; }
.form-message.error { color: var(--danger); }
.fine-print { margin: 2px 0 0; color: var(--muted); font-size: .71rem; }
.setup-steps { max-width: 510px; padding-left: 20px; color: var(--muted); }
.setup-steps li { margin-bottom: 7px; }
.noscript { padding: 16px; background: #fff0eb; color: #7f3428; text-align: center; }
.access-card { width: min(520px, calc(100% - 32px)); margin: 12vh auto; padding: 42px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); text-align: center; box-shadow: var(--shadow); }
.access-card .brand-mark { margin: 0 auto 25px; }

.dashboard-content { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: clamp(34px, 5vw, 66px) 0 80px; }
.personal-content { width: min(1060px, calc(100% - 36px)); }
.dashboard-intro { margin-bottom: 30px; display: flex; justify-content: space-between; align-items: end; gap: 28px; }
.dashboard-intro h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); }
.dashboard-intro p:not(.eyebrow) { margin: 0; color: var(--muted); }
.dashboard-controls { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.dashboard-controls label { min-width: 142px; }
.dashboard-controls select { min-height: 42px; margin-top: 4px; }
.data-badge { min-height: 36px; padding: 8px 11px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--green-soft); color: var(--ink); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.data-badge.loading { background: #ece9e1; color: var(--muted); }
.data-badge.error { background: #ffe7df; color: #8e392c; }

.kpi-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi-card { min-height: 142px; padding: 21px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.kpi-card.highlight { border-color: #a9c6b2; background: #eaf2ec; }
.kpi-card > span { color: var(--muted); font-size: .72rem; font-weight: 750; }
.kpi-card strong { margin: auto 0 3px; font-family: Georgia, serif; font-size: 2.5rem; font-weight: 500; line-height: 1; }
.kpi-card small { color: var(--muted); font-size: .68rem; }
.report-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-card { min-width: 0; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: 19px; background: var(--paper); }
.report-card.full { grid-column: 1 / -1; }
.card-heading { margin-bottom: 21px; display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.card-heading h2 { margin: 0; }
.card-heading > span { color: var(--muted); font-size: .7rem; }
.split-list, .funnel-list { display: grid; gap: 14px; }
.metric-line-top { margin-bottom: 6px; display: flex; justify-content: space-between; gap: 14px; font-size: .76rem; }
.metric-line-top span { color: var(--muted); }
.metric-track { height: 8px; overflow: hidden; border-radius: 99px; background: #eceae3; }
.metric-track span { height: 100%; display: block; border-radius: inherit; background: var(--metric-color, var(--green)); }
.outcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.outcome-box { padding: 14px; border-radius: 13px; background: #f2f0ea; }
.outcome-box strong { display: block; font-size: 1.35rem; }
.outcome-box span { color: var(--muted); font-size: .67rem; }
.method-note { margin: 16px 0 0; color: var(--muted); font-size: .68rem; }
.call-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.call-stat { padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.call-stat strong { display: block; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.call-stat span { color: var(--muted); font-size: .68rem; }

.team-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.team-table { min-width: 820px; display: grid; }
.team-row { min-height: 62px; display: grid; grid-template-columns: 1.55fr .75fr .85fr .6fr .85fr .55fr .55fr .9fr; align-items: center; gap: 12px; border-bottom: 1px solid #ece9e2; font-size: .75rem; }
.team-row:last-child { border-bottom: 0; }
.team-row.head { min-height: 38px; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.person-cell { min-width: 0; display: flex; flex-direction: column; }
.person-cell strong, .person-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-cell small { color: var(--muted); font-size: .67rem; }
.role-badge { width: fit-content; padding: 5px 8px; border-radius: 999px; background: #edf2ee; color: var(--ink-soft); font-size: .62rem; font-weight: 800; text-transform: capitalize; }
.role-badge.manager { background: #e7e1ef; }
.coverage { display: flex; align-items: center; gap: 7px; }
.coverage i { width: 48px; height: 5px; overflow: hidden; border-radius: 99px; background: #e9e7e0; }
.coverage b { height: 100%; display: block; background: var(--green); }
.warning-badge { width: fit-content; padding: 4px 7px; border-radius: 8px; background: #fff0eb; color: #8e392c; font-size: .62rem; }
.ok-badge { color: var(--muted); font-size: .65rem; }
.empty-state { padding: 34px 20px; border: 1px dashed #c9c7bf; border-radius: 16px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }
.error-state { padding: 24px; border: 1px solid #f1c8bd; border-radius: 16px; background: #fff0eb; color: #7f3428; }

.recent-list { display: grid; }
.recent-item { min-height: 62px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #ece9e2; }
.recent-item:last-child { border-bottom: 0; }
.recent-item .activity-mark { width: 38px; height: 38px; border-radius: 12px; }
.recent-item > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.recent-item small { overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.recent-item b { font-variant-numeric: tabular-nums; font-size: .78rem; }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.source-item { padding: 15px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; }
.source-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--green-soft); font-weight: 900; }
.source-item span:last-child { min-width: 0; display: flex; flex-direction: column; }
.source-item small { color: var(--muted); font-size: .66rem; }

.team-access-card { margin-top: 16px; }
.team-form { display: grid; grid-template-columns: 1fr 1.25fr 1fr auto; align-items: end; gap: 10px; }
.team-form input { margin-bottom: 0; }
.credential-box { margin-top: 18px; padding: 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid #e0c373; border-radius: 15px; background: #fff7db; }
.credential-box strong { display: block; }
.credential-box code { margin: 7px 0; display: block; color: #513d00; font-size: 1.1rem; font-weight: 850; letter-spacing: .08em; }
.credential-box p { margin: 0; color: #756535; font-size: .72rem; }
.team-access-list { margin-top: 26px; display: grid; gap: 9px; }
.access-list-heading { margin-bottom: 2px; display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.access-list-heading h3 { margin: 0; }
.access-list-heading > span { color: var(--muted); font-size: .7rem; }
.access-person { min-width: 0; padding: 13px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fcfaf5; }
.access-person > span:first-child { min-width: 0; display: flex; flex-direction: column; }
.access-person small { overflow: hidden; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.role-badge.inactive { background: #eeeae2; color: var(--muted); }
.access-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }

.review-card > .form-message { margin-top: -12px; }
.review-list { display: grid; gap: 11px; }
.review-item { padding: 16px; display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(180px, .8fr) minmax(220px, 1fr); align-items: end; gap: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fcfaf5; }
.review-summary { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.review-summary strong, .review-summary small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-summary small { color: var(--muted); font-size: .67rem; }
.review-item input { margin-bottom: 0; }
.review-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .today-card { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-form { grid-template-columns: 1fr 1fr; }
  .auth-layout { grid-template-columns: 1fr; gap: 35px; }
  .auth-intro { max-width: none; }
  .auth-brand { margin-bottom: 45px; }
}

@media (max-width: 760px) {
  body.has-app-nav { padding-bottom: 72px; }
  h1 { font-size: 2.65rem; }
  .topbar { min-height: 62px; padding: 10px 16px; }
  .brand { font-size: 1.12rem; }
  .brand-mark { width: 34px; height: 34px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .topbar-actions {
    position: absolute;
    top: calc(100% + 7px);
    right: 12px;
    width: min(280px, calc(100vw - 24px));
    padding: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  .topbar-actions.open { display: flex; }
  .topbar-actions .nav-link { display: none; }
  .topbar-actions .sync-pill { justify-content: center; }
  .topbar-actions .avatar { display: none; }
  .mobile-nav {
    position: fixed;
    z-index: 35;
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    height: 58px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    border: 1px solid rgba(23,56,58,.12);
    border-radius: 18px;
    background: rgba(255,253,248,.94);
    box-shadow: 0 12px 35px rgba(23,56,58,.18);
    backdrop-filter: blur(16px);
  }
  .mobile-nav a { display: grid; place-items: center; border-radius: 12px; color: var(--muted); font-size: .72rem; font-weight: 800; text-decoration: none; }
  .mobile-nav a.active { background: var(--ink); color: white; }
  .workspace, .dashboard-content, .personal-content { width: min(100% - 24px, 680px); }
  .workspace { padding-top: 28px; gap: 22px; }
  .activity-grid { grid-template-columns: 1fr; gap: 9px; }
  .activity-card { min-height: 76px; padding: 13px; }
  .activity-mark { width: 42px; height: 42px; }
  .running-main { padding: 32px 18px; }
  .running-clock { font-size: 3.3rem; }
  .today-card { border-radius: 18px; }
  .dashboard-intro { align-items: stretch; flex-direction: column; }
  .dashboard-controls { justify-content: flex-start; }
  .dashboard-controls label { flex: 1; }
  .report-grid { grid-template-columns: 1fr; }
  .kpi-card { min-height: 125px; padding: 17px; }
  .kpi-card strong { font-size: 2.15rem; }
  .report-card.full { grid-column: auto; }
  .team-wrap { overflow: visible; }
  .team-table { min-width: 0; gap: 10px; }
  .team-row.head { display: none; }
  .team-row:not(.head) { min-height: 0; padding: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fcfaf5; }
  .team-row:not(.head) > span { min-width: 0; }
  .team-row:not(.head) > .person-cell { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px solid #ece9e2; }
  .team-row:not(.head) > span:nth-child(n+3)::before { display: block; margin-bottom: 2px; color: var(--muted); font-size: .57rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .team-row:not(.head) > span:nth-child(3)::before { content: "Office"; }
  .team-row:not(.head) > span:nth-child(4)::before { content: "Recorded"; }
  .team-row:not(.head) > span:nth-child(5)::before { content: "Talent Acquisition"; }
  .team-row:not(.head) > span:nth-child(6)::before { content: "Meetings"; }
  .team-row:not(.head) > span:nth-child(7)::before { content: "Last activity"; }
  .team-row:not(.head) > span:nth-child(7) { grid-column: 1 / -1; }
  .source-grid { grid-template-columns: 1fr; }
  .team-form { grid-template-columns: 1fr; }
  .credential-box { align-items: stretch; flex-direction: column; }
  .access-person { grid-template-columns: minmax(0, 1fr) auto; }
  .access-actions { grid-column: 1 / -1; justify-content: stretch; }
  .access-actions button { flex: 1; }
  .review-item { grid-template-columns: 1fr; }
  .review-actions { grid-column: auto; justify-content: stretch; }
  .review-actions button { flex: 1; }
  .auth-layout { padding: 28px 18px; align-items: start; }
  .auth-card { padding: 23px 18px; }
  .auth-intro p:not(.eyebrow) { font-size: .93rem; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { min-height: 118px; padding: 14px; }
  .kpi-card > span { font-size: .64rem; }
  .kpi-card strong { font-size: 1.8rem; }
  .outcome-grid { grid-template-columns: 1fr 1fr; }
  .call-stats { grid-template-columns: 1fr 1fr; }
  .dashboard-controls .secondary-button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* v1.1 reporting and category controls */
.dashboard-controls input[type="datetime-local"] { min-height: 42px; margin-top: 4px; min-width: 185px; }
.category-management-card { margin-bottom: 16px; }
.category-form { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) auto; align-items: end; gap: 10px; margin-top: 14px; }
.category-form input, .category-form select { margin-bottom: 0; }
.category-list { margin-top: 14px; display: grid; gap: 8px; }
.category-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fcfaf5; }
.category-copy { min-width: 0; display: grid; gap: 2px; }
.category-copy strong { font-size: .82rem; }
.category-copy small { color: var(--muted); font-size: .68rem; }
.metric-line-top small { color: var(--muted); font-size: .58rem; font-weight: 700; }
@media (max-width: 900px) { .category-form { grid-template-columns: 1fr 1fr; } .category-form .primary-button { grid-column: 1 / -1; } }
@media (max-width: 640px) { .category-form { grid-template-columns: 1fr; } .category-form .primary-button { grid-column: auto; } .category-item { grid-template-columns: auto 1fr; } .category-item button { grid-column: 1 / -1; } }

@media (max-width: 640px) {
  .team-row:not(.head) > span:nth-child(6)::before { content: "Idle"; }
  .team-row:not(.head) > span:nth-child(7)::before { content: "Meetings"; }
  .team-row:not(.head) > span:nth-child(7) { grid-column: auto; }
  .team-row:not(.head) > span:nth-child(8)::before { content: "Last activity"; }
  .team-row:not(.head) > span:nth-child(8) { grid-column: 1 / -1; }
}

/* v1.2 custom-category time note */
.time-note-area { padding: 18px 24px 4px; border-top: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04); }
.time-note-area label { display: block; margin-bottom: 8px; color: rgba(255,255,255,.62); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.time-note-area label small { margin-left: 5px; color: rgba(255,255,255,.42); font-size: .61rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.time-note-area textarea { width: 100%; min-height: 76px; resize: vertical; margin: 0; padding: 11px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; font: inherit; line-height: 1.4; }
.time-note-area textarea::placeholder { color: rgba(255,255,255,.42); }
.time-note-area textarea:focus { outline: 2px solid rgba(255,255,255,.32); outline-offset: 1px; }

/* v1.3 one-off custom time entry */
.manual-entry-button {
  width: 100%; min-height: 74px; margin-top: 14px; padding: 14px 16px;
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 13px;
  border: 1px dashed color-mix(in srgb, var(--green) 48%, var(--line)); border-radius: 17px;
  background: rgba(255, 253, 248, .62); color: var(--ink); text-align: left; cursor: pointer;
}
.manual-entry-button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.manual-entry-button strong { font-size: .9rem; }
.manual-entry-button small { color: var(--muted); font-size: .72rem; }
.manual-entry-button:hover { border-style: solid; background: var(--paper); }
.custom-time-form { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,248,.82); }
.custom-time-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.custom-time-head > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.custom-time-head strong { font-size: 1rem; }
.custom-time-head small { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.custom-close { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--muted); cursor: pointer; font-size: 1.25rem; }
.custom-field { min-width: 0; display: flex; flex-direction: column; gap: 7px; color: var(--ink-soft); font-size: .74rem; font-weight: 750; }
.custom-field small { color: var(--muted); font-weight: 600; }
.custom-field input, .custom-field textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; }
.custom-field input { min-height: 46px; padding: 9px 11px; }
.custom-field textarea { min-height: 78px; padding: 11px; resize: vertical; line-height: 1.4; }
.custom-field-wide { margin-bottom: 13px; }
.custom-time-grid { display: grid; grid-template-columns: 1.25fr 1fr .7fr .7fr; gap: 10px; }
.custom-time-actions { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.custom-time-actions .form-message { margin: 0; }
@media (max-width: 720px) {
  .custom-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .custom-time-grid { grid-template-columns: 1fr; }
  .custom-time-actions .primary-button { width: 100%; }
}

/* v1.4 meeting detail, mandatory notes, analytics and editable categories */
.activity-card.selected { border-color: var(--green); background: color-mix(in srgb, var(--green-soft) 65%, var(--paper)); }
.activity-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.activity-copy small { color: var(--muted); font-size: .67rem; }
.activity-start-panel { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,248,.9); }
.activity-start-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.activity-start-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.activity-start-head strong { font-size: 1rem; }
.activity-start-head small { color: var(--muted); font-size: .74rem; }
.suboption-fieldset { margin: 0 0 14px; padding: 0; border: 0; }
.suboption-fieldset legend { margin-bottom: 8px; color: var(--ink-soft); font-size: .74rem; font-weight: 800; }
.suboption-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.suboption-choice { min-width: 0; min-height: 48px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-size: .76rem; font-weight: 700; }
.suboption-choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.suboption-choice input { margin: 0; }
.custom-time-grid-three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.running-label > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.running-label small { color: rgba(255,255,255,.62); font-size: .68rem; }
.recent-item em { margin-top: 3px; overflow: hidden; color: var(--ink-soft); font-size: .68rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-controls input[type="date"] { min-height: 42px; margin-top: 4px; min-width: 150px; }
.analytics-control-card { margin: 16px 0; padding: 18px 20px; display: flex; justify-content: space-between; align-items: end; gap: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.analytics-control-card h2 { margin: 2px 0 0; font-size: 1.15rem; }
.analytics-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.analytics-controls label { min-width: 170px; color: var(--muted); font-size: .66rem; font-weight: 800; }
.analytics-controls select, .analytics-controls input { width: 100%; min-height: 42px; margin-top: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 7px 9px; font: inherit; font-size: .78rem; }
.analytics-card { margin-bottom: 16px; }
.analytics-summary { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.analytics-summary > div { padding: 12px; display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: 12px; background: #fcfaf5; }
.analytics-summary strong { font-size: 1.15rem; }
.analytics-summary span { color: var(--muted); font-size: .64rem; }
.analytics-bars { display: grid; gap: 10px; }
.analytics-row { display: grid; grid-template-columns: minmax(135px,.9fr) minmax(120px,2fr) 60px; gap: 10px; align-items: center; }
.analytics-row > span { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-row > i { height: 9px; overflow: hidden; border-radius: 999px; background: #ede9e1; }
.analytics-row > i > b { height: 100%; display: block; border-radius: inherit; background: var(--bar-color, var(--green)); }
.analytics-row > strong { text-align: right; font-size: .72rem; }
.category-name-input { width: 100%; min-width: 0; min-height: 40px; margin: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font: inherit; font-size: .82rem; font-weight: 700; }
.category-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
@media (max-width: 720px) {
  .suboption-grid, .custom-time-grid-three { grid-template-columns: 1fr; }
  .analytics-control-card { align-items: stretch; flex-direction: column; }
  .analytics-controls { width: 100%; }
  .analytics-controls label { flex: 1 1 160px; }
  .analytics-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analytics-row { grid-template-columns: 1fr 55px; }
  .analytics-row > i { grid-column: 1 / -1; grid-row: 2; }
  .analytics-row > strong { grid-column: 2; grid-row: 1; }
  .category-actions { grid-column: 1 / -1; justify-content: stretch; }
  .category-actions button { flex: 1; }
}
.analytics-detail-list { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.analytics-detail-list h3 { margin: 0 0 8px; font-size: .84rem; }
.analytics-detail-row { min-height: 54px; padding: 8px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #ece9e2; }
.analytics-detail-row:last-child { border-bottom: 0; }
.analytics-detail-row > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.analytics-detail-row small, .analytics-detail-row em { overflow: hidden; color: var(--muted); font-size: .66rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.analytics-detail-row em { color: var(--ink-soft); }
.analytics-detail-row > b { font-size: .72rem; }

/* v1.4.1 responsive UI refinement */
html, body { max-width: 100%; overflow-x: hidden; }
body { min-width: 320px; }
button, input, select, textarea { max-width: 100%; }
textarea { font: inherit; }
img, svg { max-width: 100%; height: auto; }
:where(.activity-copy, .custom-time-head > div, .activity-start-head > div, .card-heading, .person-cell, .analytics-detail-row > span, .category-copy) { min-width: 0; }
:where(.activity-copy strong, .activity-start-head strong, .custom-time-head strong, .card-heading h2, .analytics-detail-row strong, .category-copy strong) { overflow-wrap: anywhere; }

/* Header scales smoothly from desktop to phone. */
.topbar {
  width: 100%;
  min-height: 68px;
  padding-inline: clamp(14px, 3vw, 44px);
}
.topbar-actions { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.nav-link, .text-button, .nav-toggle { min-height: 44px; }

/* Main tracking screen. */
.workspace {
  width: min(1280px, calc(100% - clamp(24px, 4vw, 56px)));
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: clamp(22px, 3.5vw, 52px);
  padding-top: clamp(28px, 4vw, 58px);
}
.tracker-panel { width: 100%; }
.activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.activity-card {
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 15px;
}
.activity-copy strong { line-height: 1.25; }
.activity-copy small { white-space: normal; line-height: 1.35; }
.running-card, .activity-start-panel, .custom-time-form, .today-card { max-width: 100%; }
.running-clock { font-size: clamp(2.8rem, 7vw, 5.8rem); overflow-wrap: normal; }
.time-note-area textarea, .custom-field textarea { min-height: 92px; }
.activity-start-panel, .custom-time-form { padding: clamp(16px, 2.4vw, 22px); }
.suboption-choice { min-height: 52px; line-height: 1.3; }
.custom-time-grid-three { grid-template-columns: minmax(150px, .95fr) minmax(150px, 1fr) minmax(150px, 1fr); }
.custom-time-actions { align-items: flex-start; }
.custom-time-actions .form-message { flex: 1 1 220px; }
.today-card { width: 100%; }

/* Dashboard spacing and controls. */
.dashboard-content {
  width: min(1320px, calc(100% - clamp(24px, 4vw, 56px)));
  padding-top: clamp(28px, 4vw, 54px);
}
.personal-content { width: min(1120px, calc(100% - clamp(24px, 4vw, 56px))); }
.dashboard-intro { align-items: flex-end; }
.dashboard-intro > div:first-child { min-width: 0; flex: 1 1 360px; }
.dashboard-controls { min-width: 0; flex: 1 1 620px; }
.dashboard-controls label {
  min-width: 0;
  flex: 1 1 165px;
  max-width: 230px;
}
.dashboard-controls input,
.dashboard-controls select { width: 100%; min-width: 0 !important; }
.dashboard-controls button { min-height: 44px; }
.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi-card { min-width: 0; }
.report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-card { overflow: hidden; }
.card-heading { flex-wrap: wrap; }
.outcome-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.call-stats { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.source-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.analytics-control-card { align-items: center; }
.analytics-control-card > div:first-child { min-width: 0; flex: 1 1 260px; }
.analytics-controls { flex: 1 1 420px; justify-content: flex-end; }
.analytics-controls label { min-width: 0; flex: 1 1 165px; max-width: 240px; }
.analytics-summary { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
.analytics-row { grid-template-columns: minmax(120px, .85fr) minmax(120px, 2.2fr) minmax(52px, auto); }
.analytics-row > span { white-space: normal; line-height: 1.3; }
.analytics-detail-row small, .analytics-detail-row em { white-space: normal; overflow-wrap: anywhere; }
.team-wrap { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.category-item { min-width: 0; }
.category-form { grid-template-columns: minmax(180px, 1.4fr) minmax(160px, .9fr) auto; }
.category-actions button, .access-actions button, .review-actions button { min-height: 42px; }
.team-form { grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.25fr) minmax(150px, 1fr) auto; }

/* Authentication and setup screens. */
.auth-layout {
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  padding: clamp(24px, 5vw, 72px);
}
.auth-card { width: 100%; }
.auth-card input, .auth-card select { font-size: 16px; }

/* Tablet layout. */
@media (max-width: 1080px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); }
  .dashboard-intro { align-items: stretch; flex-direction: column; gap: 20px; }
  .dashboard-controls { width: 100%; justify-content: flex-start; flex-basis: auto; }
  .dashboard-controls label { max-width: none; }
  .team-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-form .primary-button { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .today-card { position: static; top: auto; }
  .today-head { padding: 20px; }
  .summary-list { padding-inline: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
  .next-meeting { margin-inline: 20px; }
  .report-grid { grid-template-columns: 1fr; }
  .report-card.full { grid-column: auto; }
  .analytics-control-card { align-items: stretch; flex-direction: column; }
  .analytics-controls { width: 100%; justify-content: flex-start; }
  .analytics-controls label { max-width: none; }
  .category-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-form .primary-button { grid-column: 1 / -1; }
}

/* Mobile navigation and content. */
@media (max-width: 760px) {
  body.has-app-nav { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 60px; padding: 8px 12px; }
  .brand { font-size: 1.05rem; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .nav-toggle { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; }
  .topbar-actions {
    top: calc(100% + 6px);
    right: 10px;
    width: min(300px, calc(100vw - 20px));
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding: 10px;
  }
  .topbar-actions .sync-pill { min-height: 40px; }
  .text-button { width: 100%; border-radius: 10px; background: #f6f3ec; }
  .mobile-nav {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    height: auto;
    min-height: 58px;
    display: flex;
    grid-template-columns: none;
    gap: 5px;
  }
  .mobile-nav a { min-width: 0; min-height: 46px; flex: 1 1 0; padding: 7px 5px; line-height: 1.1; text-align: center; }

  .workspace,
  .dashboard-content,
  .personal-content { width: calc(100% - 20px); }
  .workspace, .dashboard-content { padding-top: 22px; padding-bottom: 32px; }
  h1, .dashboard-intro h1 { font-size: clamp(2.2rem, 11vw, 3.15rem); line-height: 1; }
  .lede { font-size: .95rem; }

  .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .activity-card {
    min-height: 104px;
    padding: 12px;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 8px 10px;
  }
  .activity-card .activity-mark { width: 40px; height: 40px; grid-row: 1 / span 2; }
  .activity-card .start-arrow { display: none; }
  .activity-copy strong { font-size: .82rem; }
  .activity-copy small { font-size: .64rem; }
  .manual-entry-button { min-height: 76px; grid-template-columns: 42px minmax(0, 1fr); }
  .manual-entry-button .start-arrow { display: none; }
  .running-card { border-radius: 20px; }
  .running-main { padding: 28px 14px; }
  .running-clock { font-size: clamp(2.65rem, 15vw, 4.4rem); letter-spacing: -.055em; }
  .stage-area, .time-note-area, .stop-area { padding-inline: 16px; }
  .stage-chips { justify-content: flex-start; }
  .stage-chip { flex: 1 1 auto; }
  .activity-start-panel, .custom-time-form { border-radius: 16px; }
  .activity-start-head, .custom-time-head { gap: 10px; }
  .custom-close { width: 44px; height: 44px; }
  .suboption-grid { grid-template-columns: 1fr; }
  .suboption-choice { min-height: 52px; }
  .custom-time-grid-three { grid-template-columns: 1fr; }
  .custom-time-actions { align-items: stretch; flex-direction: column; }
  .custom-time-actions .primary-button { width: 100%; min-height: 48px; }
  .custom-time-actions .form-message { flex: 0 0 auto; width: 100%; }
  .privacy-note { align-items: flex-start; line-height: 1.4; }

  .summary-list { grid-template-columns: 1fr 1fr; padding: 16px; gap: 10px 16px; }
  .summary-row { font-size: .74rem; }
  .today-head { padding: 18px 16px 15px; }
  .next-meeting { margin: 0 16px 16px; }

  .dashboard-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 8px; }
  .dashboard-controls > * { min-width: 0; max-width: none !important; }
  .dashboard-controls label { width: 100%; }
  .dashboard-controls .data-badge { align-self: end; justify-content: center; }
  .dashboard-controls .primary-button,
  .dashboard-controls .secondary-button { width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi-card { min-height: 112px; padding: 14px; }
  .kpi-card strong { font-size: clamp(1.75rem, 8vw, 2.15rem); }
  .report-card { padding: 17px; border-radius: 16px; }
  .card-heading { margin-bottom: 16px; }
  .source-grid { grid-template-columns: 1fr; }
  .analytics-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-controls label { width: 100%; }
  .analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .analytics-row > span { font-size: .7rem; }
  .analytics-row > i { grid-column: 1 / -1; grid-row: 2; }
  .analytics-row > strong { grid-column: 2; grid-row: 1; }
  .analytics-detail-row { grid-template-columns: minmax(0, 1fr) auto; }

  .team-wrap { overflow: visible; }
  .team-table { min-width: 0; gap: 10px; }
  .team-row.head { display: none; }
  .team-row:not(.head) {
    min-height: 0;
    padding: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fcfaf5;
  }
  .team-row:not(.head) > .person-cell { grid-column: 1 / -1; }
  .team-row:not(.head) > span { overflow-wrap: anywhere; }
  .coverage i { width: min(48px, 11vw); }

  .category-form, .team-form { grid-template-columns: 1fr; }
  .category-form .primary-button, .team-form .primary-button { grid-column: auto; }
  .category-item { grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  .category-actions { grid-column: 1 / -1; justify-content: stretch; }
  .category-actions button { flex: 1 1 120px; }
  .access-person { grid-template-columns: minmax(0, 1fr); }
  .access-actions { grid-column: auto; justify-content: stretch; }
  .review-item { grid-template-columns: 1fr; }
  .review-actions { grid-column: auto; justify-content: stretch; }

  .auth-layout { min-height: auto; padding: 22px 14px 34px; gap: 24px; }
  .auth-brand { margin-bottom: 28px; }
  .auth-card { padding: 20px 16px; border-radius: 18px; }
  .auth-intro p:not(.eyebrow) { font-size: .92rem; }
  .setup-steps { padding-left: 18px; }
}

@media (max-width: 520px) {
  .activity-grid { grid-template-columns: 1fr; }
  .activity-card {
    min-height: 72px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }
  .activity-card .activity-mark { grid-row: auto; }
  .activity-card .start-arrow { display: inline; }
  .summary-list { grid-template-columns: 1fr; }
  .dashboard-controls, .analytics-controls { grid-template-columns: 1fr; }
  .dashboard-controls .data-badge { justify-content: flex-start; width: fit-content; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .outcome-grid, .call-stats { grid-template-columns: 1fr 1fr; }
  .analytics-summary { grid-template-columns: 1fr 1fr; }
  .recent-item { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 9px; }
  .recent-item em, .recent-item small { white-space: normal; line-height: 1.35; }
  .credential-box { padding: 14px; }
  .credential-box code { overflow-wrap: anywhere; letter-spacing: .04em; }
}

@media (max-width: 380px) {
  .workspace, .dashboard-content, .personal-content { width: calc(100% - 16px); }
  .topbar { padding-inline: 9px; }
  .brand span:last-child { display: none; }
  h1, .dashboard-intro h1 { font-size: 2.15rem; }
  .kpi-grid, .outcome-grid, .call-stats, .analytics-summary { grid-template-columns: 1fr; }
  .running-clock { font-size: 2.55rem; }
  .mobile-nav { left: 6px; right: 6px; }
  .mobile-nav a { font-size: .67rem; }
}

@media (hover: none) and (pointer: coarse) {
  .activity-card:hover, .manual-entry-button:hover { transform: none; }
  .activity-card, .manual-entry-button, .suboption-choice, .stage-chip, .primary-button, .secondary-button, .text-button, .custom-close { touch-action: manipulation; }
}


/* v1.4.2 systematic meeting-choice UI fix */
.suboption-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.suboption-choice {
  position: relative;
  min-width: 0;
  min-height: 64px;
  margin: 0;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.25;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
/* Override the global text-input sizing rules. Native radios stay visually hidden and small. */
.suboption-choice input[type="radio"] {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.suboption-indicator {
  width: 20px;
  height: 20px;
  display: block;
  border: 2px solid #aaa99f;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.suboption-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.suboption-copy strong {
  min-width: 0;
  color: var(--ink);
  font-size: .82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.suboption-copy small {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  line-height: 1.25;
}
.suboption-choice:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 12%, transparent);
}
.suboption-choice:has(input:checked) .suboption-indicator {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 5px #fff;
}
.suboption-choice:has(input:focus-visible) {
  outline: 3px solid rgba(239,118,91,.24);
  outline-offset: 2px;
}
.suboption-fieldset legend {
  margin-bottom: 10px;
}
.activity-start-panel .custom-field-wide {
  margin-top: 2px;
}
.activity-start-panel .custom-time-actions {
  margin-top: 14px;
  padding-bottom: 2px;
}
.activity-start-panel .primary-button {
  min-width: 132px;
}
@media (hover:hover) and (pointer:fine) {
  .suboption-choice:hover {
    border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  }
}
@media (max-width: 720px) {
  .suboption-grid { grid-template-columns: 1fr; gap: 8px; }
  .suboption-choice { min-height: 58px; padding: 11px 12px; }
}


/* v1.4.3 activity pie charts + 9-hour attendance analytics */
.pie-layout {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 38px);
}
.pie-chart-wrap { display: flex; justify-content: center; }
.pie-chart {
  width: min(230px, 100%);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--pie));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.pie-chart::after {
  content: "";
  width: 46%;
  aspect-ratio: 1;
  position: absolute;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
}
.pie-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.pie-center strong { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.pie-center span { margin-top: 4px; color: var(--muted); font-size: .64rem; font-weight: 750; }
.pie-legend { min-width: 0; display: grid; gap: 8px; }
.pie-legend-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #ece9e2;
}
.pie-legend-row:last-child { border-bottom: 0; }
.pie-legend-row > i { width: 10px; height: 10px; border-radius: 50%; background: var(--legend-color); }
.pie-legend-row > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pie-legend-row strong { overflow-wrap: anywhere; font-size: .74rem; }
.pie-legend-row small { color: var(--muted); font-size: .62rem; }
.pie-legend-row > b { font-size: .72rem; white-space: nowrap; }
.analytics-summary { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.analytics-summary strong { overflow-wrap: anywhere; }
.team-row { grid-template-columns: minmax(190px,1.5fr) 90px 115px 82px 82px 110px 72px minmax(150px,1.05fr) 72px; }
.team-row > span > small { display: block; margin-top: 2px; color: var(--muted); font-size: .58rem; }

@media (max-width: 860px) {
  .pie-layout { grid-template-columns: 1fr; }
  .pie-chart { width: min(210px, 62vw); }
}
@media (max-width: 520px) {
  .pie-chart { width: min(190px, 70vw); }
  .pie-legend-row { grid-template-columns: 9px minmax(0,1fr) auto; gap: 8px; }
  .analytics-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* v1.4.3 team-card labels for the expanded attendance columns */
.team-table { min-width: 1120px; }
@media (max-width: 980px) {
  .team-table { min-width: 0; }
  .team-row:not(.head) > span:nth-child(3)::before { content: "Office"; }
  .team-row:not(.head) > span:nth-child(4)::before { content: "Tracked"; }
  .team-row:not(.head) > span:nth-child(5)::before { content: "9h target"; }
  .team-row:not(.head) > span:nth-child(6)::before { content: "Talent Acquisition"; }
  .team-row:not(.head) > span:nth-child(7)::before { content: "Idle"; }
  .team-row:not(.head) > span:nth-child(8)::before { content: "Login → Logout"; }
  .team-row:not(.head) > span:nth-child(9)::before { content: "Meetings"; }
  .team-row:not(.head) > span:nth-child(8) { grid-column: 1 / -1; }
  .team-row:not(.head) > span:nth-child(9) { grid-column: auto; }
}

/* v1.5.0 Calling + explicit BTM GPS tracking */
.gps-consent {
  margin-top: 14px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f8f4;
  cursor: pointer;
}
.gps-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--green);
}
.gps-consent > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gps-consent strong { color: var(--ink); font-size: .78rem; }
.gps-consent small { color: var(--muted); font-size: .66rem; line-height: 1.45; }
.gps-running-area {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.gps-live-status { min-width: 0; display: flex; flex-direction: column; gap: 2px; color: rgba(255,255,255,.76); }
.gps-live-status strong { color: #fff; font-size: .73rem; }
.gps-live-status span { font-size: .62rem; line-height: 1.4; }
.gps-live-status.active strong::before { content: "● "; color: #9bd4b8; }
.gps-live-status.error strong::before { content: "● "; color: #f3aa91; }
.gps-toggle-button { flex: 0 0 auto; }
.travel-report-card { margin-bottom: 16px; }
.travel-session-list { display: grid; gap: 12px; }
.travel-session {
  padding: 14px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfaf5;
}
.travel-session > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.travel-session > div:first-child strong { font-size: .8rem; }
.travel-session > div:first-child small { color: var(--muted); font-size: .65rem; }
.travel-links { display: flex; flex-wrap: wrap; gap: 8px; }
.travel-links a,
.travel-stops a {
  color: var(--green-dark, var(--ink));
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.travel-links a { padding: 8px 10px; font-size: .68rem; font-weight: 750; }
.travel-stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.travel-stops a { padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.travel-stops strong { font-size: .7rem; }
.travel-stops span { color: var(--muted); font-size: .62rem; line-height: 1.4; }
@media (max-width: 640px) {
  .gps-running-area { padding: 12px 16px; align-items: stretch; flex-direction: column; }
  .gps-toggle-button { width: 100%; }
  .travel-stops { grid-template-columns: 1fr; }
}


/* v1.5.1 Admin-only Calling audit */
.calling-audit-card { grid-column: 1 / -1; }
.calling-audit-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:4px 0 16px; }
.calling-audit-summary > div { border:1px solid var(--line); border-radius:14px; padding:13px 14px; background:#fcfaf5; display:flex; flex-direction:column; gap:3px; min-width:0; }
.calling-audit-summary strong { color:var(--ink); font-family:var(--serif); font-size:1.35rem; line-height:1; }
.calling-audit-summary span { color:var(--muted); font-size:.66rem; line-height:1.35; }
.calling-audit-list { display:grid; gap:0; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.calling-audit-row { display:grid; grid-template-columns:minmax(250px,2fr) repeat(4,minmax(90px,.65fr)); gap:12px; align-items:center; padding:11px 13px; border-top:1px solid var(--line); background:#fff; }
.calling-audit-row:first-child { border-top:0; }
.calling-audit-row.head { background:#f7f5ef; color:var(--muted); font-size:.62rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.calling-audit-row > span { min-width:0; }
.calling-audit-row > span:first-child { display:flex; flex-direction:column; gap:2px; }
.calling-audit-row strong, .calling-audit-row b { color:var(--ink); font-size:.74rem; }
.calling-audit-row small { color:var(--muted); font-size:.61rem; line-height:1.35; }
.calling-audit-row em { color:var(--muted); font-size:.62rem; font-style:normal; line-height:1.4; overflow-wrap:anywhere; margin-top:2px; }
@media (max-width: 820px) {
  .calling-audit-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calling-audit-row.head { display:none; }
  .calling-audit-list { border:0; gap:10px; overflow:visible; }
  .calling-audit-row { grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--line); border-radius:14px; padding:12px; gap:9px 12px; }
  .calling-audit-row > span:first-child { grid-column:1 / -1; padding-bottom:7px; border-bottom:1px solid var(--line); }
  .calling-audit-row > span:not(:first-child)::before { content:attr(data-label); display:block; color:var(--muted); font-size:.58rem; font-weight:750; margin-bottom:2px; }
}
@media (max-width: 480px) {
  .calling-audit-summary { grid-template-columns:1fr 1fr; }
  .calling-audit-row { grid-template-columns:1fr 1fr; }
}
