:root {
  --bg: #f4f7fa;
  --ink: #1a2433;
  --muted: #5c6b76;
  --card: #ffffff;
  --line: #d7dee7;
  --navy: #0a1b3d;
  --green: #00b86b;
  --accent: #00b86b;
  --accent-ink: #ffffff;
  --warn: #8a5a00;
  --danger: #9b1c1c;
  --ok: #00b86b;
  --shadow: 0 10px 30px rgba(10, 27, 61, 0.08);
  --font: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9e8ef 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e7f7ef 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
}

/* DEV-only chrome: clear red header so develop is never confused with production */
body.env-dev .top {
  background: #b91c1c;
  border-bottom-color: #7f1d1d;
  color: #fff;
}
body.env-dev .top .brand-mark,
body.env-dev .top .brand-my,
body.env-dev .top .brand-reflo,
body.env-dev .top nav a {
  color: #fff;
}
body.env-dev .top .brand-tagline,
body.env-dev .top .linkish {
  color: rgba(255, 255, 255, 0.88);
}
body.env-dev .top .linkish:hover {
  color: #fff;
}
body.env-dev .top .nav-tour-btn {
  color: #fde68a;
}
body.env-dev .top .nav-help {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
body.env-dev .top .nav-help:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
}
body.env-dev .env-badge {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  align-self: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.brand-mark:hover { text-decoration: none; }
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
  flex: 0 0 auto;
}
.brand-wordmark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-my { color: var(--navy); }
.brand-reflo { color: var(--green); }
.brand-tagline {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--muted, #5c6b76);
  max-width: 18rem;
  line-height: 1.3;
  margin-left: calc(36px + 0.55rem);
}
.tag {
  font-size: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  color: var(--muted);
  font-weight: 600;
}
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.inline { display: inline; margin: 0; }
.linkish {
  background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 0;
}
.linkish:hover { color: var(--ink); }

.wrap { width: min(1100px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.wrap-wide { width: min(1800px, calc(100% - 2rem)); }
.wrap-full { width: calc(100% - 2rem); max-width: none; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
}
h1 { margin: 0 0 0.4rem; font-size: 1.7rem; }
h2 { margin: 0 0 0.75rem; font-size: 1.2rem; }
.lede { color: var(--muted); margin: 0 0 1.25rem; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.page-head h1 { margin: 0; }
.page-head-actions {
  margin: 0;
  align-items: end;
}
.page-head-aside {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}
.page-head-tools {
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.meeting-outside td {
  border-top: 2px solid var(--line);
  background: #f7faf8;
}

.bulk-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(1100px, calc(100vw - 2rem));
  max-width: 1100px;
  box-shadow: var(--shadow);
  background: var(--card);
  color: var(--ink);
}
.bulk-dialog::backdrop {
  background: rgba(20, 33, 43, 0.45);
}
.bulk-dialog-inner {
  padding: 1.1rem 1.25rem 1.25rem;
}
.bulk-dialog-scroll {
  max-height: min(55vh, 520px);
  margin-top: 0.75rem;
}
.bulk-dialog select,
.bulk-dialog input[type="text"],
.bulk-dialog input[type="number"] {
  min-width: 6rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
}
table.table-compact tfoot td {
  border-top: 2px solid var(--line);
  font-weight: 700;
  padding-top: 0.75rem;
}
.page-head-actions label { margin-bottom: 0; }

.stack { display: grid; gap: 1rem; }
/* Ensure [hidden] wins over utility display classes like .stack */
[hidden] { display: none !important; }
.is-hidden { display: none !important; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.auth {
  width: min(520px, 100%);
  margin: 2rem auto;
}
.auth.auth-landing {
  width: min(920px, 100%);
  padding: 0;
  overflow: hidden;
}
.auth-journey {
  padding: 1.35rem 1.5rem 0.75rem;
  background:
    radial-gradient(700px 280px at 10% -20%, #d9e8ef 0%, transparent 55%),
    radial-gradient(600px 240px at 100% 0%, #e7f7ef 0%, transparent 50%),
    #fff;
}
.auth-journey img,
.auth-feature-bar {
  display: block;
  width: 100%;
  height: auto;
}
.auth-feature-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.auth-body {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem 1.5rem;
  align-items: start;
}
.auth .pitch {
  margin: 0;
  padding: 0;
  border-bottom: 0;
}
.auth .pitch .lede { margin-bottom: 0.45rem; }
.auth .pitch .muted { margin: 0 0 0.75rem; line-height: 1.45; }
.auth .pitch .muted:last-child { margin-bottom: 0; }
.auth-form h1 { margin-bottom: 0.85rem; }
@media (max-width: 720px) {
  .auth-body { grid-template-columns: 1fr; }
  .auth-journey { padding: 1rem 1rem 0.5rem; }
  .auth-body { padding: 1rem 1.1rem 1.25rem; }
}

label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.85rem; }
input, select, textarea, button, .btn {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fff;
  color: var(--ink);
}
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
}
button.secondary, .btn.secondary {
  background: #e8eef2;
  color: var(--ink);
}
button.danger { background: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }

.flash {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.flash.ok { background: #e7f6ef; color: var(--ok); }
.flash.err { background: #fdecec; color: var(--danger); }
.flash.warn { background: #fff6e5; color: var(--warn); }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.65rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover { color: var(--ink); }
th.sortable a {
  color: inherit;
  text-decoration: none;
}
th.sortable a:hover { color: var(--ink); }
th.sortable::after {
  content: " ↕";
  font-size: 0.75em;
  opacity: 0.45;
}
th.sortable.sorted-asc::after { content: " ↑"; opacity: 0.9; color: var(--accent); }
th.sortable.sorted-desc::after { content: " ↓"; opacity: 0.9; color: var(--accent); }
.analytics-filters label { margin-bottom: 0.5rem; }
.muted { color: var(--muted); }
.jms-help { margin: 0.35rem 0 0.75rem; }
.jms-help-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.jms-help-link:hover { text-decoration-thickness: 2px; }
.cardish {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: #fbfcfd;
}
.user-row { margin-bottom: 1rem; }
.user-row form { margin-top: 0.6rem; }
.small { font-size: 0.85rem; }
.status {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e8eef2;
}
.status.pending { background: #fff6e5; color: var(--warn); }
.status.approved { background: #e7f6ef; color: var(--ok); }
.status.rejected, .status.disabled { background: #fdecec; color: var(--danger); }

.status-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: #e8eef2;
  color: var(--ink);
}
.status-chip-new { background: #e8eef2; color: #3d4f5c; }
.status-chip-contacted { background: #e7f0fb; color: #1d4f91; }
.status-chip-followup { background: #fff6e5; color: var(--warn); }
.status-chip-won { background: #e7f6ef; color: var(--ok); }
.status-chip-lost { background: #fdecec; color: var(--danger); }
.status-chip-other { background: #eef1f4; color: var(--muted); }
.status-chip-tyfcb {
  background: #0b6e4f;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.detail-grid {
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.detail-span { grid-column: 1 / -1; }
.detail-value {
  margin-top: 0.25rem;
  font-weight: 600;
  word-break: break-word;
}
.detail-value.comments {
  font-weight: 500;
  white-space: pre-wrap;
  line-height: 1.45;
  min-height: 3rem;
}

.filter-bar { margin-bottom: 1rem; }
.filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.filter-chip input { width: auto; margin: 0; }
.filter-chip:has(input:not(:checked)) {
  opacity: 0.55;
  background: #f3f6f8;
}

.admin-table { margin-top: 0.5rem; }
.admin-table td { vertical-align: middle; }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.btn-small,
button.btn-small,
a.btn-small {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}
.impersonation-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 1.5rem;
  background: #143d2b;
  color: #f3faf6;
  font-weight: 600;
}
.impersonation-banner button {
  background: #fff;
  color: #143d2b;
}

.referral-columns {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.referral-column {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.referral-column h2 {
  margin: 0 0 0.35rem;
}
.referral-column .filter-bar {
  padding: 0.75rem;
}
.referral-column table {
  font-size: 0.82rem;
  width: 100%;
}
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table,
.table-compact {
  width: max-content;
  max-width: 100%;
  min-width: 0;
  table-layout: auto;
}
.table-compact th,
.table-compact td {
  padding: 0.5rem 0.65rem;
  white-space: nowrap;
  vertical-align: middle;
}
.table-compact tr.row-queued td {
  background: rgba(34, 120, 80, 0.06);
}
.table-compact th.col-check,
.table-compact td.col-check {
  width: 2rem;
  padding-right: 0.25rem;
}
.table-compact td.cell-email {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 16rem;
}
.cell-email {
  word-break: break-word;
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .referral-columns { grid-template-columns: 1fr; }
}

.dash-greeting {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}
.dash-greeting-text { min-width: 0; flex: 1; }
.dash-greeting-text .lede { margin-bottom: 0; }
.headshot {
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #e7f2ec 0%, #d9e8ef 100%);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.headshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.headshot-fallback {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
}
.dash-meeting-cta {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(10, 27, 61, 0.2);
  background: linear-gradient(135deg, var(--navy) 0%, #009e5c 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.dash-meeting-cta:hover {
  text-decoration: none;
  color: #fff;
  filter: brightness(1.05);
}
.dash-meeting-cta:active { transform: scale(0.99); }
.dash-meeting-cta-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}
.dash-meeting-cta-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}
.dash-meeting-cta-meta {
  font-size: 0.9rem;
  opacity: 0.92;
}
.nav-meeting {
  color: var(--accent) !important;
}
.team-reset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.45rem;
}
.team-reset-row input {
  min-width: 10rem;
  flex: 1 1 10rem;
  margin: 0;
}

@media (max-width: 640px) {
  .dash-greeting { align-items: flex-start; }
  .headshot { width: 3.25rem; height: 3.25rem; }
  .headshot-fallback { font-size: 1rem; }

  .top {
    align-items: flex-start;
    gap: 0.65rem;
  }
  .top nav {
    width: 100%;
    gap: 0.55rem 0.85rem;
  }
  .nav-meeting {
    order: -1;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink) !important;
  }

  .dash-meeting-cta {
    padding: 1.25rem 1.15rem;
    min-height: 5.5rem;
    align-content: center;
  }
  .dash-meeting-cta-title { font-size: 1.5rem; }

  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .page-head-actions {
    width: 100%;
  }
  .page-head-actions .actions,
  .actions {
    width: 100%;
  }
  .actions .btn,
  .actions button,
  .actions a.btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

.summary-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.summary-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.summary-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.summary-value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.35rem 0 0.4rem;
  color: var(--accent);
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-weight: 600;
}
.check-inline input { width: auto; margin: 0; }

.sm8-top {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: start;
  margin-bottom: 1.25rem;
  max-width: 36rem;
}
.sm8-top .cardish { padding: 1rem; }
.sm8-top h2,
.sm8-jobs h2 { margin: 0 0 0.35rem; }
.sm8-jobs { min-width: 0; }
.sm8-schedule-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
  margin-top: 0.75rem;
}
.sm8-schedule-form .check-inline { grid-column: 1 / -1; }
.sm8-schedule-form .actions { margin-top: 0; }
.referrer-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.referrer-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.referrer-list li:last-child { border-bottom: 0; }
.referrer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  min-width: 0;
}
.referrer-email {
  font-weight: 600;
  word-break: break-all;
}
.referrer-count {
  font-weight: 800;
  color: var(--accent);
}
.referrer-count::before { content: "| "; color: var(--muted); font-weight: 600; }
@media (max-width: 980px) {
  .sm8-top { grid-template-columns: 1fr; }
}


/* Product tour — never lock document scroll (users need to reach Save / test buttons). */
.tour-root { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 43, 0.45);
  pointer-events: auto;
}
.tour-card,
.tour-card button {
  pointer-events: auto;
}
.tour-highlight {
  position: fixed;
  z-index: 81;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(20, 33, 43, 0.45);
  border: 2px solid var(--accent);
  pointer-events: none;
  transition: top 0.15s ease, left 0.15s ease, width 0.15s ease, height 0.15s ease;
}
.tour-card {
  position: fixed;
  z-index: 82;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  max-width: 360px;
}
.tour-card--center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 24px));
}
.tour-card h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.1rem;
}
.tour-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.tour-progress {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.tour-nav { display: flex; gap: 0.4rem; }
.nav-tour-btn {
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.nav-tour-btn:hover { text-decoration: underline; }

/* Interactive tour steps: let the user scroll, click, and type in the page */
body.tour-interact .tour-backdrop { display: none; }
body.tour-interact .tour-highlight {
  box-shadow: 0 0 0 9999px rgba(20, 33, 43, 0.28);
  pointer-events: none;
}
body.tour-interact .tour-card { box-shadow: 0 12px 40px rgba(20, 33, 43, 0.25); }

/* Non-interactive steps: dim the page but still allow scroll to see context */
body.tour-active:not(.tour-interact) .tour-backdrop {
  pointer-events: none;
}

/* In-app feedback — compact bubble, bottom-right; does not lock page scroll */
.feedback-root {
  position: fixed !important;
  right: 1.15rem !important;
  bottom: 1.15rem !important;
  left: auto !important;
  top: auto !important;
  z-index: 90;
  width: auto;
  max-width: calc(100vw - 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  /* Let wheel/touch scroll the page through empty space around the widget */
  pointer-events: none;
}
.feedback-root .feedback-fab,
.feedback-root .feedback-panel {
  pointer-events: auto;
}
.feedback-fab {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 650;
  font-size: 0.92rem;
  padding: 0.55rem 0.95rem;
  box-shadow: 0 8px 22px rgba(20, 33, 43, 0.16);
  cursor: pointer;
}
.feedback-fab:hover { filter: brightness(1.05); }
.feedback-panel {
  width: 21rem;
  max-width: calc(100vw - 1.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(20, 33, 43, 0.16);
  overflow: hidden;
}
.feedback-panel[hidden] { display: none !important; }
.feedback-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  background: var(--accent);
  color: #fff;
}
.feedback-panel-head strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}
.feedback-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
}
.feedback-x {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
  opacity: 0.9;
}
.feedback-x:hover { opacity: 1; }
.feedback-form {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem 0.85rem;
}
.feedback-stars {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.feedback-root label.feedback-star {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0.1rem;
  gap: 0;
  font-weight: 400;
  font-size: inherit;
  cursor: pointer;
  color: #c5d0d8;
  width: auto;
}
.feedback-star input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.feedback-star-glyph {
  font-size: 1.45rem;
  line-height: 1;
}
.feedback-star.is-on .feedback-star-glyph,
.feedback-star.is-hover .feedback-star-glyph {
  color: #e3a008;
}
.feedback-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 6rem;
  max-height: 12rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
}
.feedback-form textarea:focus {
  outline: 2px solid rgba(11, 110, 79, 0.25);
  border-color: var(--accent);
}
.feedback-submit {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  width: 100%;
}
.feedback-submit:hover { filter: brightness(1.05); }
.feedback-msg {
  margin: 0;
  font-size: 0.82rem;
  padding: 0.4rem 0.5rem;
}
.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;
}
@media (max-width: 640px) {
  .feedback-root {
    right: 0.75rem !important;
    bottom: 0.75rem !important;
  }
  .feedback-panel { width: 19.5rem; }
}

/* Help / knowledge base */
.nav-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f4f7f9;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-help:hover {
  background: #e8eef2;
  text-decoration: none;
  border-color: #c5d0d8;
}
.help-page .lede { max-width: 42rem; }
.help-guide-list { gap: 0.75rem; }
.help-guide-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.help-guide-card:hover {
  border-color: #b7c6d0;
  background: #fff;
  text-decoration: none;
}
.help-guide-card strong {
  font-size: 1.05rem;
  color: var(--ink);
}
.help-guide-cat {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.help-article-nav { margin-bottom: -0.25rem; }
.help-step-nav {
  margin: 0 0 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafb;
}
.help-step-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
}
.help-step-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}
.help-step-nav a:hover { color: var(--ink); text-decoration: none; background: #fff; }
.help-step-nav .is-current a {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 600;
}
.help-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(20, 33, 43, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
}
.help-step-nav .is-current .help-step-num {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}
.help-step-footer {
  margin-top: 0.5rem;
  justify-content: space-between;
}
.help-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}
.help-step h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.help-step p,
.help-step ul,
.help-step ol {
  margin: 0 0 0.75rem;
  max-width: 42rem;
  line-height: 1.5;
}
.help-step ul { padding-left: 1.2rem; }
.help-substeps {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  max-width: 42rem;
  line-height: 1.55;
}
.help-figure {
  margin: 0.5rem 0 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafb;
  max-width: 40rem;
}
.help-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.help-figure figcaption {
  margin-top: 0.45rem;
}
.help-figure-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.help-aside {
  margin-top: 0.5rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}
.help-aside h2 {
  margin: 0;
  font-size: 1.1rem;
}
.help-aside > p {
  margin: 0;
  max-width: 42rem;
  line-height: 1.5;
  color: var(--muted);
}
.help-aside ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  max-width: 42rem;
  line-height: 1.55;
}
.help-code {
  display: block;
  margin: 0.5rem 0 0.85rem;
  padding: 0.85rem 1rem;
  max-width: 48rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #14212b;
  color: #e8eef2;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.xero-helper {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7fafb;
}
.xero-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.xero-redirect {
  flex: 1 1 16rem;
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  word-break: break-all;
}
.small-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
.xero-actions {
  display: grid;
  gap: 0.35rem;
  margin: 0.25rem 0 0.5rem;
}
.xero-advanced {
  margin: 0.35rem 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}
.xero-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}
.xero-advanced[open] {
  display: grid;
  gap: 0.65rem;
}
