/* 5tar Agencies, v16 */

:root {
  --ink: #0d1b2a;
  --navy: #12314f;
  --navy-deep: #081b2e;
  --navy-mid: #1b4a72;
  --gold: #d99a12;
  --gold-lit: #f2c14e;
  --body: #48596a;
  --muted: #7b8b9b;
  --line: #e3e9f0;
  --line-soft: #eef2f7;
  --bg: #f5f7fa;
  --card: #ffffff;
  --good: #147a52;
  --good-bg: #e2f4ea;
  --bad: #b23c1c;
  --bad-bg: #fdeee8;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;

  --sh-1: 0 1px 2px rgba(13, 27, 42, .06);
  --sh-2: 0 1px 2px rgba(13, 27, 42, .05), 0 6px 18px rgba(13, 27, 42, .07);
  --sh-3: 0 2px 6px rgba(13, 27, 42, .07), 0 18px 44px rgba(13, 27, 42, .12);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A whisper of colour in the page field so it does not read as flat grey */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 30rem at 12% -8%, rgba(27, 74, 114, .07), transparent 60%),
    radial-gradient(45rem 26rem at 100% 0%, rgba(217, 154, 18, .07), transparent 60%);
}

h1, h2, h3 {
  color: var(--ink);
  margin: 0 0 .5rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.021em;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.12rem; letter-spacing: -.014em; }
h3 { font-size: 1rem; letter-spacing: -.008em; }
p { margin: 0 0 .85rem; }
a { color: var(--navy-mid); }

.wrap {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: 1.9rem 0 5rem;
  position: relative;
  z-index: 1;
}
.hint { color: var(--muted); font-size: .92rem; max-width: 64ch; }
.muted { color: var(--muted); font-size: .88rem; }
.nowrap { white-space: nowrap; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background:
    radial-gradient(30rem 12rem at 8% 0%, rgba(242, 193, 78, .16), transparent 65%),
    linear-gradient(115deg, var(--navy-deep) 0%, var(--navy) 52%, var(--navy-mid) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 6px 24px rgba(8, 27, 46, .28);
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 3vw .35rem;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--gold-lit);
}
.brand span {
  color: #fff;
  text-shadow: 0 1px 12px rgba(242, 193, 78, .28);
}
.brand svg { filter: drop-shadow(0 2px 6px rgba(242, 193, 78, .45)); }

.tabs {
  display: flex;
  gap: .1rem;
  padding: 0 3vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  background: none;
  border: 0;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: #a9c4dc;
  padding: .62rem .95rem .7rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.tab::after {
  content: "";
  position: absolute;
  left: .95rem; right: .95rem; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-lit));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s var(--ease);
}
.tab .ti { opacity: .55; transition: opacity .18s var(--ease); }
.tab:hover .ti, .tab.on .ti { opacity: 1; }
.tab.on .ti { color: var(--gold-lit); }
.tab:hover { color: #fff; }
.tab.on { color: #fff; }
.tab.on::after { transform: scaleX(1); }



/* ---------------- shared ---------------- */
.view { display: none; }
.view.on { display: block; animation: rise .32s var(--ease); }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.section-h { margin-top: 2.2rem; }

/* buttons */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: .55rem 1.1rem;
  font: inherit;
  font-size: .92rem;
  font-weight: 650;
  letter-spacing: -.005em;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255, 255, 255, .13);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
              filter .16s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .16);
  filter: brightness(1.07);
}
.btn:active { transform: none; filter: brightness(.96); }
.btn:disabled { opacity: .5; cursor: default; transform: none; filter: none; }
.btn.ghost {
  background: var(--card);
  color: var(--navy);
  border-color: var(--line);
  box-shadow: var(--sh-1);
}
.btn.ghost:hover { background: #fbfcfe; border-color: #cdd9e5; }
.btn.danger { color: var(--bad); border-color: #eccdc2; background: #fff; }
.btn.danger:hover { background: var(--bad-bg); }
.btn-wide { width: 100%; margin-top: 1.2rem; padding: .7rem; font-size: 1rem; }

.mini {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--body);
  border-radius: 6px;
  padding: .2rem .55rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.mini:hover { background: #f2f6fa; color: var(--navy); border-color: #c7d5e2; }
.mini.del:hover { background: var(--bad-bg); color: var(--bad); border-color: #eccdc2; }

/* panels */
.panel {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.35rem;
  box-shadow: var(--sh-2);
  margin-bottom: 1.15rem;
}
.panel.narrow { max-width: 640px; }
.panel > h2 { display: flex; align-items: center; gap: .5rem; }
.panel > h2::before {
  content: "";
  width: 3px; height: 1em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-lit), var(--gold));
}

/* forms */
label {
  display: block;
  font-weight: 650;
  color: var(--ink);
  font-size: .85rem;
  letter-spacing: -.003em;
  margin: .85rem 0 .3rem;
}
input[type=text], input[type=password], input[type=search],
input[type=date], input[type=email], input[type=tel], select, textarea {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #ccd8e4;
  border-radius: var(--r-sm);
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder, textarea::placeholder { color: #a8b6c4; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3px rgba(27, 74, 114, .14);
}
input[readonly] { background: #f6f8fb; color: var(--muted); }
.check { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; }
.check input { width: auto; }
.check label { margin: 0; }

.row-between {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.1rem; flex-wrap: wrap;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.search { max-width: 430px; margin: .9rem 0; }

/* chips */
.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0; }
.chip {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--body);
  border-radius: 999px;
  padding: .3rem .85rem;
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh-1);
  transition: all .16s var(--ease);
}
.chip:hover { border-color: #b9c8d7; transform: translateY(-1px); }
.chip.on {
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  border-color: var(--navy);
  color: #fff;
  box-shadow: var(--sh-2);
}

/* segmented switch */
.seg {
  display: inline-flex;
  background: #e8edf3;
  border-radius: 11px;
  padding: .28rem;
  gap: .2rem;
  margin-bottom: 1.3rem;
  flex-wrap: wrap;
  box-shadow: inset 0 1px 3px rgba(13, 27, 42, .07);
}
.seg-btn {
  background: none; border: 0; border-radius: 8px;
  font: inherit; font-size: .92rem; font-weight: 650;
  color: var(--body); padding: .46rem 1.05rem; cursor: pointer;
  transition: all .18s var(--ease);
}
.seg-btn:hover { color: var(--navy); }
.seg-btn.on {
  background: #fff; color: var(--navy);
  box-shadow: 0 1px 3px rgba(13, 27, 42, .16), 0 3px 8px rgba(13, 27, 42, .08);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .18rem;
  color: var(--muted);
  padding: 2.4rem 1rem;
  font-size: .95rem;
  text-align: center;
}
.empty svg { color: #c3d0dd; margin-bottom: .35rem; }
.empty b { color: var(--ink); font-weight: 700; font-size: 1rem; }
.empty span { font-size: .88rem; }

/* ---------------- dashboard ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .9rem;
  margin: 1.3rem 0 1.4rem;
}
.tile {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1rem 1.05rem .95rem;
  box-shadow: var(--sh-2);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.tile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lit));
}
.tile-ic { color: var(--gold); opacity: .85; margin-bottom: .15rem; display: block; }
.tile b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.tile span {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .01em;
}

.bar-row {
  display: grid;
  grid-template-columns: 7.8rem 1fr 2.4rem;
  align-items: center;
  gap: .7rem;
  margin-bottom: .55rem;
}
.bar-row .lab { display: flex; }
.bar-track {
  background: #e9eff5;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(13, 27, 42, .08);
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy-mid), var(--navy));
  min-width: 3px;
  transition: width .5s var(--ease);
}
.bar-row .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
}

.mini-lead {
  display: flex; justify-content: space-between; align-items: center;
  gap: .6rem; padding: .5rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .92rem;
}
.mini-lead:last-child { border-bottom: 0; }

/* ---------------- dashboard hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: 1.7rem 1.8rem 1.5rem;
  margin-bottom: 1.2rem;
  color: #cfe1f0;
  background:
    radial-gradient(34rem 16rem at 88% -40%, rgba(242, 193, 78, .26), transparent 65%),
    radial-gradient(24rem 14rem at 8% 130%, rgba(27, 74, 114, .8), transparent 62%),
    linear-gradient(122deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  box-shadow: var(--sh-3);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem 1.6rem;
  align-items: start;
}
/* faint star watermark, the brand showing up where there is room for it */
.hero::after {
  content: "";
  position: absolute;
  right: -3.5rem; top: -3.5rem;
  width: 17rem; height: 17rem;
  background: currentColor;
  opacity: .045;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 8 61 38 93 38 67 57 77 88 50 69 23 88 33 57 7 38 39 38z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 8 61 38 93 38 67 57 77 88 50 69 23 88 33 57 7 38 39 38z'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero-date {
  font-size: .74rem; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--gold-lit); margin: 0 0 .25rem;
}
.hero h1 {
  color: #fff; font-size: 1.85rem; margin: 0 0 .3rem;
  letter-spacing: -.028em;
}
.hero-line { color: #a9c8e0; margin: 0; font-size: .96rem; max-width: 46ch; }
.hero-actions {
  position: relative; z-index: 1;
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-lit), var(--gold));
  color: #3b2a05;
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 6px 18px rgba(217, 154, 18, .35), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-onnavy {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  box-shadow: none;
}
.btn-onnavy:hover { background: rgba(255, 255, 255, .18); filter: none; }

.hero-week {
  grid-column: 1 / -1;
  position: relative; z-index: 1;
  display: flex; gap: 2.2rem; flex-wrap: wrap;
  margin-top: .3rem; padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.wk b {
  display: block; color: #fff; font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.03em; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.wk span { color: #cfe1f0; font-size: .84rem; font-weight: 650; }
.wk em {
  display: block; font-style: normal; color: #86a8c5;
  font-size: .74rem; letter-spacing: .02em;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 1.15rem;
  align-items: start;
}

.att-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .6rem;
  align-items: center;
  padding: .55rem .1rem;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  border-radius: 6px;
  transition: background .14s var(--ease);
}
.att-row:hover { background: #f7fafd; }
.att-row:last-child { border-bottom: 0; }
.att-name { font-weight: 650; color: var(--ink); font-size: .93rem; }
.att-tel { display: block; font-weight: 500; font-size: .82rem; color: var(--navy-mid); }
.att-days {
  font-size: .78rem; font-weight: 800; color: var(--bad);
  background: var(--bad-bg); border: 1px solid #f2cbbc;
  border-radius: 999px; padding: .08rem .45rem;
  font-variant-numeric: tabular-nums;
}

/* ---------------- badges ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .16rem .6rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .012em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  opacity: .75;
}
/* Lead statuses. The older names below are still used by appointments,
   client sheets and the team list, so they stay. */
.s-New { background: #e6effb; color: #16528f; border-color: #cfe0f5; }
.s-Nopickup { background: #eef1f4; color: #5b6875; border-color: #dde3e9; }
.s-Notinterested { background: var(--bad-bg); color: #99290d; border-color: #f2cbbc; }
.s-Interested { background: #fdf2da; color: #855403; border-color: #f4e2b4; }
.s-Isinterested { background: #fdf2da; color: #855403; border-color: #f4e2b4; }
.s-Closed { background: var(--good-bg); color: var(--good); border-color: #c2e6d3; }
.s-Contacted { background: #fdf2da; color: #855403; border-color: #f4e2b4; }
.s-Quoted { background: #efe8fb; color: #573ba3; border-color: #ddd2f3; }
.s-Applied { background: #d9f2ee; color: #0e6159; border-color: #bde6df; }
.s-Issued { background: var(--good-bg); color: var(--good); border-color: #c2e6d3; }
.s-Lost { background: #edf0f3; color: #64717e; border-color: #dde3e9; }

.r-PreferredPlus { background: #cff0dc; color: #0a5730; border-color: #b0e3c6; }
.r-Preferred { background: var(--good-bg); color: var(--good); border-color: #c2e6d3; }
.r-StandardPlus { background: #d9f2ee; color: #0e6159; border-color: #bde6df; }
.r-Standard { background: #e6effb; color: #16528f; border-color: #cfe0f5; }
.r-Table24 { background: #fdf2da; color: #855403; border-color: #f4e2b4; }
.r-Table5 { background: #fce4d4; color: #8c4413; border-color: #f5cfb4; }
.r-Decline { background: var(--bad-bg); color: #99290d; border-color: #f2cbbc; }

/* ---------------- the numbers ---------------- */
.kpi-grid {
  display: grid; gap: .8rem; margin: 1rem 0 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.kpi-cell {
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, #fbfcfe, #fff); padding: .7rem .8rem .8rem;
}
.kpi-lab {
  display: block; font-size: .72rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .45rem;
}
.kpi-set { display: flex; align-items: center; gap: .4rem; }
.kpi-btn {
  width: 2rem; height: 2rem; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--navy);
  font-size: 1.05rem; font-weight: 700; line-height: 1; cursor: pointer;
  transition: background .12s var(--ease), border-color .12s var(--ease);
}
.kpi-btn:hover { border-color: var(--navy-mid); background: var(--bg); }
.kpi-btn.plus { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi-btn.plus:hover { background: var(--navy-mid); }
.kpi-in {
  flex: 1; min-width: 0; margin: 0 !important; text-align: center;
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; padding: .3rem .2rem !important;
}
.kpi-ratios {
  display: grid; gap: .8rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}
.kpi-ratio {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); padding: .8rem .9rem .85rem; box-shadow: var(--sh-1);
}
.kpi-ratio b {
  display: block; font-size: 1.4rem; color: var(--ink);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.kpi-ratio span {
  display: block; font-size: .74rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin-top: .15rem;
}
.kpi-ratio em {
  display: block; font-style: normal; font-size: .79rem;
  color: var(--body); margin-top: .3rem; line-height: 1.4;
}
.kpi-ratio.wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  border-color: transparent;
}
.kpi-ratio.wide b { color: #fff; }
.kpi-ratio.wide span { color: var(--gold-lit); }
.kpi-ratio.wide em { color: rgba(255, 255, 255, .82); }

/* ---------------- money made ---------------- */
.money { margin-bottom: 1.3rem; }
.mny-row {
  display: grid; gap: .8rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.mny {
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, #fbfcfe, #fff);
  padding: .85rem 1rem .9rem;
}
.mny b {
  display: block; font-size: 1.5rem; line-height: 1.15; color: var(--ink);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.mny span {
  display: block; font-size: .74rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-top: .2rem;
}
.mny em { display: block; font-style: normal; font-size: .8rem; color: var(--body); margin-top: .3rem; }
.mny:first-child { border-color: #e8c98a; background: linear-gradient(180deg, #fffaef, #fff); }
.mny:first-child b { color: #8a5b06; }
.mbars {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: .5rem; align-items: end; height: 9.5rem; margin-top: 1.3rem;
}
.mbar { display: flex; flex-direction: column; align-items: center; height: 100%; gap: .3rem; }
.mbar-v { font-size: .7rem; color: var(--body); font-variant-numeric: tabular-nums; }
.mbar-track {
  flex: 1; width: 100%; display: flex; align-items: flex-end;
  background: var(--bg); border-radius: var(--r-sm);
}
.mbar-fill {
  width: 100%; border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--gold-lit), var(--gold));
}
.mbar-l { font-size: .74rem; color: var(--muted); font-weight: 700; }
.mlist { display: grid; gap: .35rem; }
.mrow {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .6rem; border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); background: var(--card); font-size: .87rem;
}
.mrow-n { flex: 1; color: var(--ink); font-weight: 600; }
.mrow-d { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.mrow b { color: var(--good); font-variant-numeric: tabular-nums; }

/* ---------------- carrier cards ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.05rem;
  margin-top: 1.1rem;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.2rem;
  box-shadow: var(--sh-2);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              border-color .2s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: #d3dfeb;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.card h3 { margin: 0; }
.gauge { display: flex; align-items: center; gap: .55rem; margin: .8rem 0 .9rem; }
.gauge-track {
  flex: 1; height: 9px; background: #e9eff5;
  border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(13, 27, 42, .09);
}
.gauge-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lit));
  box-shadow: 0 0 10px rgba(217, 154, 18, .5);
  transition: width .5s var(--ease);
}
.gauge b {
  font-size: .82rem; color: var(--ink); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.kv { font-size: .9rem; margin-bottom: .45rem; }
.kv em {
  font-style: normal; display: block;
  color: var(--muted); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  margin-bottom: .05rem;
}
.tag-noexam {
  background: var(--good-bg); color: var(--good);
  border: 1px solid #c2e6d3;
  border-radius: 999px; padding: .12rem .55rem;
  font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.card-notes {
  white-space: pre-wrap; font-size: .89rem;
  border-top: 1px solid var(--line-soft);
  margin-top: .85rem; padding-top: .75rem;
  color: var(--body);
}
.card-actions { display: flex; gap: .4rem; margin-top: auto; padding-top: .95rem; }

/* ---------------- scripts ---------------- */
.script {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: .55rem;
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.script:hover { box-shadow: var(--sh-2); border-color: #d6e1ec; }
.script.open { box-shadow: var(--sh-2); }
.script-head {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1.05rem; cursor: pointer;
}
.script-head:hover { background: #fafcfe; }
.script-head .cat {
  font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--navy-mid); background: #eaf1f8;
  border: 1px solid #d9e5f0;
  padding: .18rem .5rem; border-radius: 5px; white-space: nowrap;
}
.script-head .t { font-weight: 650; color: var(--ink); flex: 1; }
.script-head .caret {
  color: var(--muted); font-size: 1rem;
  transition: transform .22s var(--ease);
}
.script-body { display: none; padding: 0 1.05rem 1.05rem; }
.script.open .script-body { display: block; }
.script.open .caret { transform: rotate(90deg); }
.script-text {
  white-space: pre-wrap;
  background: #f7fafc;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 1rem;
  font-size: .94rem;
  line-height: 1.65;
}
.script-actions { display: flex; gap: .4rem; margin-top: .75rem; }

/* ---------------- playbook ---------------- */
.sc-head {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  padding: 1.3rem 1.5rem; margin-bottom: 1.1rem;
  border-radius: var(--r-lg); color: #cfe1f0;
  background:
    radial-gradient(24rem 11rem at 92% -40%, rgba(242, 193, 78, .2), transparent 65%),
    linear-gradient(125deg, var(--navy-deep), var(--navy) 58%, var(--navy-mid));
  box-shadow: var(--sh-3);
}
.sc-mark {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 16px;
  display: grid; place-items: center; color: var(--gold-lit);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.sc-title { flex: 1; min-width: 12rem; }
.sc-agency {
  margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--gold-lit);
}
.sc-head h1 { color: #fff; font-size: 1.4rem; margin: .1rem 0 .15rem; }
.sc-sub { margin: 0; color: #a9c8e0; font-size: .88rem; }

.sc-step {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  color: #fff; font-size: .82rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* what the agent says, and everything that is not that */
.script-text { background: #fff; border-left-width: 4px; padding: 1.15rem 1.25rem; }
.sc-say {
  margin: 0 0 .7rem; color: var(--ink); font-size: 1rem; line-height: 1.65;
}
.sc-step-h {
  display: flex; align-items: center; gap: .6rem;
  margin: 2rem 0 .8rem; padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 1.08rem; color: var(--ink);
}
.sc-step-h:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sc-h {
  margin: 1.3rem 0 .5rem; font-size: .74rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: var(--navy-mid);
}
.sc-h:first-child { margin-top: 0; }
.sc-list { margin: 0 0 .8rem; padding-left: 1.2rem; }
.sc-list li { margin-bottom: .3rem; color: var(--body); }
.sc-mind {
  margin: 0 0 .5rem; padding: .5rem .8rem;
  background: #f2f7fc; border-left: 3px solid var(--navy-mid);
  border-radius: 0 6px 6px 0; color: var(--body);
  font-size: .89rem; font-style: italic;
}
.sc-warn {
  margin: .8rem 0; padding: .6rem .85rem;
  background: var(--bad-bg); border-left: 3px solid var(--bad);
  border-radius: 0 6px 6px 0; color: #8a3417; font-size: .88rem;
}
.sc-cue { color: var(--muted); font-style: italic; font-size: .92em; }
.sc-blank {
  background: #fdf2da; border-bottom: 2px solid var(--gold);
  padding: 0 .3rem; border-radius: 3px 3px 0 0;
  font-weight: 650; color: #7a4d02; white-space: nowrap;
}

@media (max-width: 620px) {
  .sc-head { padding: 1.1rem; }
  .sc-head .btn { width: 100%; }
}

/* ---------------- tables ---------------- */
.table-scroll {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-2);
}
.grid { border-collapse: collapse; width: 100%; font-size: .92rem; }
.grid th, .grid td {
  text-align: left; padding: .62rem .8rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.grid th {
  background: #f7f9fc;
  color: var(--muted);
  font-size: .71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  border-bottom: 1px solid var(--line);
}
.grid tbody tr { transition: background .14s var(--ease); }
.grid tbody tr:hover { background: #f8fbfd; }
.grid tr:last-child td { border-bottom: 0; }
.grid td.actions { white-space: nowrap; text-align: right; }
.grid select.inline {
  padding: .22rem 1.4rem .22rem .55rem;
  font-size: .82rem; font-weight: 700;
  border-radius: 999px; width: auto;
  border: 1px solid currentColor;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right .62rem center, right .44rem center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.cell-notes { max-width: 22rem; white-space: pre-wrap; color: var(--body); }

/* ---------------- call review ---------------- */
.review-out {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--r);
  padding: 1.35rem;
  box-shadow: var(--sh-2);
  margin-bottom: 1rem;
}
.review-out h3 {
  margin-top: 1.25rem; color: var(--navy);
  font-size: .8rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
}
.review-out h3:first-child { margin-top: 0; }
.review-out ul { padding-left: 1.2rem; margin: .35rem 0 .85rem; }
.review-out li { margin-bottom: .35rem; }
.review-out p { margin: 0 0 .75rem; }
.review-out strong { color: var(--ink); }
.rv-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: .7rem; margin-bottom: .85rem; padding-bottom: .65rem;
  border-bottom: 1px solid var(--line-soft);
}
.rv-meta .who { font-weight: 800; color: var(--ink); }
.rv-transcript { margin-top: .95rem; }
.rv-transcript summary { cursor: pointer; font-size: .87rem; color: var(--muted); }
.rv-transcript pre {
  white-space: pre-wrap; background: #f7fafc;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: .85rem; font-size: .85rem; margin-top: .55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid #ccd8e4; border-top-color: var(--navy);
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: -2px; margin-right: .45rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.key-state { font-weight: 700; font-size: .92rem; }
.key-state.yes { color: var(--good); }
.key-state.no { color: var(--bad); }

/* ---------------- client underwriting ---------------- */
.summary {
  border: 0;
  color: #cfe1f0;
  background:
    radial-gradient(28rem 12rem at 88% -30%, rgba(242, 193, 78, .22), transparent 65%),
    linear-gradient(125deg, var(--navy-deep), var(--navy) 55%, var(--navy-mid));
  box-shadow: var(--sh-3);
}
.summary h2 {
  color: #fff; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .11em; font-weight: 800;
}
.summary > h2::before { background: var(--gold-lit); }
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.sum em {
  display: block; font-style: normal;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: #93b3cd;
}
.sum b {
  display: block; font-size: 1.65rem; font-weight: 800;
  letter-spacing: -.028em; color: #fff; line-height: 1.22;
  font-variant-numeric: tabular-nums;
}
.sum span { font-size: .76rem; color: #93b3cd; line-height: 1.45; display: block; }

.f-row { display: grid; gap: .85rem; }
.f-row.f2 { grid-template-columns: repeat(2, 1fr); }
.f-row.f4 { grid-template-columns: repeat(4, 1fr); }
.f-row label { margin-top: .55rem; }
.sub {
  background: #f7f9fc;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 1.1rem;
}
.sub h3 {
  font-size: .71rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}

.cond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: .45rem;
  margin: .7rem 0 1.1rem;
}
.cbx {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 500; font-size: .91rem; margin: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .45rem .65rem;
  cursor: pointer; color: var(--body);
  transition: all .15s var(--ease);
}
.cbx:hover { border-color: #b9c8d7; background: #fafcfe; }
.cbx input { width: auto; accent-color: var(--navy-mid); }
.cbx:has(input:checked) {
  border-color: var(--navy-mid);
  background: #eef4fa;
  color: var(--ink);
  font-weight: 650;
}

.uw-h {
  font-size: .71rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin-top: 1.2rem;
}
.uw-hit {
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, #fdf8ec, #fbfcfe 65%);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: .6rem .85rem; margin-bottom: .5rem; font-size: .9rem;
}
.uw-hit b { display: block; color: var(--ink); margin-bottom: .1rem; }
.uw-row { display: block; margin-top: .3rem; }

.ask {
  margin: 1.1rem 0 .35rem;
  padding: .8rem 1rem;
  background: #f7f9fc;
  border-left: 3px solid var(--navy-mid);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: var(--ink);
}

.danger-panel { border-color: #eccdc2; background: linear-gradient(180deg, #fffaf8, #fff); }
.warn {
  background: var(--bad-bg); border: 1px solid #f2cbbc;
  border-radius: var(--r-sm); padding: .7rem .85rem;
  font-size: .88rem; color: #8a3417;
}

.eapp-row {
  display: grid; grid-template-columns: 12rem 1fr 3rem;
  gap: .6rem; align-items: baseline;
  padding: .42rem .55rem; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; font-size: .92rem; border-radius: 6px;
  transition: background .14s var(--ease);
}
.eapp-row:hover { background: #f5f9fc; }
.eapp-row:last-child { border-bottom: 0; }
.eapp-k { color: var(--muted); font-size: .82rem; font-weight: 600; }
.eapp-v { color: var(--ink); font-weight: 650; word-break: break-word; }
.eapp-c {
  color: var(--navy-mid); font-size: .76rem; font-weight: 700;
  text-align: right; opacity: 0; transition: opacity .15s var(--ease);
}
.eapp-row:hover .eapp-c { opacity: 1; }

/* ---------------- calendar ---------------- */
.appt {
  display: grid;
  grid-template-columns: 9.5rem 1fr auto;
  gap: 1rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-2);
  padding: 1.05rem 1.15rem;
  margin-bottom: .7rem;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.appt:hover { box-shadow: var(--sh-3); border-color: #d3dfeb; }
.appt-when {
  border-right: 1px solid var(--line-soft);
  padding-right: 1rem;
}
.appt-when b {
  display: block; color: var(--ink); font-weight: 800;
  font-size: .96rem; letter-spacing: -.015em; line-height: 1.3;
}
.appt-when span { font-size: .78rem; color: var(--muted); }
.appt-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.appt-top strong { color: var(--ink); font-size: 1.02rem; }
.appt-kind {
  font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--navy-mid);
  background: #eaf1f8; border: 1px solid #d9e5f0;
  padding: .12rem .45rem; border-radius: 5px;
}
.appt-tel { font-weight: 650; font-size: .92rem; text-decoration: none; }
.appt-notes { font-size: .9rem; margin-top: .3rem; white-space: pre-wrap; }
.appt-actions { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
.appt-actions .btn { text-align: center; font-size: .84rem; padding: .4rem .8rem; }

.micnote {
  background: #fdf2da; border: 1px solid #f4e2b4; border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: .65rem .9rem;
  font-size: .89rem; color: #7a4d02; margin: 0 0 1rem; max-width: none;
}
.micnote.bad { background: var(--bad-bg); border-color: #f2cbbc; border-left-color: var(--bad); color: #8a3417; }

/* ---------------- mock call ---------------- */
/* picking which call to practise */
.sim-modes { display: grid; gap: .7rem; margin: .9rem 0 1.1rem; }
.sim-mode {
  display: grid; gap: .18rem;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: .8rem .95rem .85rem 2.4rem;
  position: relative; cursor: pointer; background: var(--card);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.sim-mode:hover { border-color: var(--navy-mid); }
.sim-mode.on { border-color: var(--gold); background: #fffdf6; box-shadow: var(--sh-1); }
.sim-mode input { position: absolute; left: .95rem; top: 1.05rem; margin: 0; }
.sim-mode b { color: var(--ink); font-size: .96rem; }
.sim-mode span { font-size: .85rem; color: var(--body); line-height: 1.5; }
.sim-mode-tag {
  display: inline-block; background: var(--navy); color: #fff;
  border-radius: 999px; padding: .08rem .55rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  margin-right: .35rem;
}
.sim-goal { margin: .1rem 0 .4rem; font-size: .9rem; color: var(--body); }
.sim-life {
  margin: .8rem 0 0; padding: .6rem .8rem;
  border-left: 3px solid var(--gold); background: #fffdf6;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .88rem; color: var(--ink);
}
.sim-uw-row { display: flex; gap: .5rem; align-items: flex-start; margin-top: .3rem; font-size: .85rem; }
.sim-uw-tag {
  flex: 0 0 auto; min-width: 4.6rem; text-align: center;
  border-radius: 999px; padding: .05rem .5rem;
  font-size: .72rem; font-weight: 700; border: 1px solid transparent;
}
.sim-uw-tag.ok { background: var(--good-bg); color: var(--good); border-color: #c2e6d3; }
.sim-uw-tag.warn { background: #fdf2da; color: #855403; border-color: #f4e2b4; }
.sim-uw-tag.bad { background: var(--bad-bg); color: #99290d; border-color: #f2cbbc; }

/* how the mock call is going */
.sim-mood {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .7rem; padding-bottom: .7rem;
  border-bottom: 1px solid var(--line-soft);
}
.sim-mood-k {
  font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.sim-pat {
  border-radius: 999px; padding: .12rem .6rem;
  font-size: .78rem; font-weight: 700; border: 1px solid transparent;
}
.sim-pat.good { background: var(--good-bg); color: var(--good); border-color: #c2e6d3; }
.sim-pat.ok { background: #e6effb; color: #16528f; border-color: #cfe0f5; }
.sim-pat.warn { background: #fdf2da; color: #855403; border-color: #f4e2b4; }
.sim-pat.bad { background: var(--bad-bg); color: #99290d; border-color: #f2cbbc; }
.sim-pat.dead { background: #3a4653; color: #fff; border-color: #3a4653; }
.sim-hangup {
  margin: 1rem 0 .2rem; padding: .8rem 1rem;
  border-radius: var(--r); border: 1px solid #f2cbbc;
  background: var(--bad-bg); color: #7d2409; font-size: .88rem; line-height: 1.55;
}
.sim-hangup b { display: block; margin-bottom: .15rem; }
.sim-input input:disabled { background: var(--line-soft); color: var(--muted); }

.sim-lead { background: linear-gradient(180deg, #fbfcfe, #fff); }
.sim-lead h2 { margin-bottom: .3rem; }
.sim-lead-line { margin: 0 0 .2rem; font-size: 1.02rem; color: var(--ink); }

.sim-chat {
  max-height: 26rem; overflow-y: auto; padding: .3rem .1rem .8rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.sim-row { display: flex; flex-direction: column; max-width: 78%; }
.sim-row.you { align-self: flex-end; align-items: flex-end; }
.sim-who {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); margin-bottom: .15rem;
}
.sim-text {
  padding: .6rem .85rem; border-radius: 14px; font-size: .95rem; line-height: 1.5;
  background: #eef2f7; color: var(--ink); border-bottom-left-radius: 4px;
}
.sim-row.you .sim-text {
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  color: #fff; border-bottom-left-radius: 14px; border-bottom-right-radius: 4px;
}
.sim-input { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.sim-input input { flex: 1; min-width: 12rem; }

.sim-uw {
  border-left: 3px solid var(--gold); background: #fdf8ec;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: .6rem .85rem; margin-bottom: .5rem; font-size: .92rem;
}
.sim-uw b { color: var(--ink); }
.sim-uw-list { list-style: none; margin: .3rem 0 0; padding: 0; }
.sim-uw-list li { margin-bottom: .25rem; }

@media (max-width: 620px) {
  .sim-row { max-width: 92%; }
  .sim-input .btn { flex: 1; }
}

/* ---------------- agent practice ---------------- */
.pr-script-box {
  margin-top: 1rem; padding: 1rem 1.15rem;
  background: #f7fafc; border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  max-height: 22rem; overflow-y: auto;
}
.pr-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-2);
  padding: 1.35rem; margin-bottom: 1rem;
}
.pr-top { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.pr-score {
  flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.pr-score span { display: block; font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; opacity: .75; margin-top: .2rem; }
.pr-score.good { background: var(--good-bg); color: var(--good); border: 2px solid #b6e0c8; }
.pr-score.ok { background: #fdf2da; color: #855403; border: 2px solid #f4e2b4; }
.pr-score.poor { background: var(--bad-bg); color: var(--bad); border: 2px solid #f2cbbc; }
.pr-top-main { flex: 1; min-width: 12rem; }
.pr-top-main h3 { margin: 0 0 .2rem; }
.pr-h {
  margin: 1.2rem 0 .4rem; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.pr-checks, .pr-miss, .pr-flags { margin: 0; padding-left: 1.1rem; font-size: .92rem; }
.pr-checks { list-style: none; padding-left: 0; }
.pr-checks li { padding: .18rem 0; font-weight: 600; }
.pr-checks li.yes { color: var(--good); }
.pr-checks li.no { color: var(--bad); }
.pr-checks li::before { content: "\2713  "; }
.pr-checks li.no::before { content: "\2715  "; }
.pr-miss li { margin-bottom: .3rem; color: var(--body); }
.pr-flags li { margin-bottom: .3rem; color: var(--bad); }

.pr-run {
  display: grid; grid-template-columns: auto 1fr auto; gap: .8rem;
  align-items: center; padding: .6rem .1rem;
  border-bottom: 1px solid var(--line-soft);
}
.pr-run:last-child { border-bottom: 0; }
.pr-pill {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums;
}
.pr-pill.good { background: var(--good-bg); color: var(--good); }
.pr-pill.ok { background: #fdf2da; color: #855403; }
.pr-pill.poor { background: var(--bad-bg); color: var(--bad); }
.pr-run-main b { display: block; color: var(--ink); }
.pr-run-main .muted { display: block; font-size: .82rem; }

/* ---------------- live recorder ---------------- */
.recorder {
  background:
    radial-gradient(26rem 12rem at 90% -40%, rgba(242, 193, 78, .18), transparent 65%),
    linear-gradient(125deg, var(--navy-deep), var(--navy) 60%, var(--navy-mid));
  border: 0; color: #cfe1f0; box-shadow: var(--sh-3);
}
.recorder h2, .recorder .hint { color: #a9c8e0; }
.rec-main { display: flex; align-items: center; gap: 1.2rem; }
.rec-btn {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08);
  cursor: pointer; display: grid; place-items: center;
  transition: all .2s var(--ease);
}
.rec-btn:hover { border-color: rgba(255, 255, 255, .55); transform: scale(1.04); }
.rec-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #e5484d; box-shadow: 0 0 14px rgba(229, 72, 77, .8);
  transition: all .2s var(--ease);
}
.rec-btn.on { border-color: #e5484d; background: rgba(229, 72, 77, .16); }
.rec-btn.on .rec-dot { border-radius: 4px; width: 18px; height: 18px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.rec-info { flex: 1; min-width: 0; }
.rec-info b {
  display: block; color: #fff; font-size: 1.9rem; font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.rec-info > span { display: block; font-size: .88rem; color: #a9c8e0; margin-bottom: .5rem; }
.rec-meter {
  height: 7px; background: rgba(255, 255, 255, .14);
  border-radius: 999px; overflow: hidden; max-width: 22rem;
}
.rec-level {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lit));
  transition: width .08s linear;
}
.rec-note { font-size: .84rem; margin: 1rem 0 .6rem; max-width: none; }
.rec-live {
  background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-sm); padding: .8rem .9rem; margin-bottom: .8rem;
  font-size: .9rem; line-height: 1.55; color: #dceaf5;
  max-height: 8rem; overflow-y: auto;
}
#rec-playback { width: 100%; margin-bottom: .8rem; }
.recorder .btn.ghost {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28);
  color: #fff; box-shadow: none;
}
.recorder .btn.ghost:hover { background: rgba(255, 255, 255, .18); filter: none; }
.recorder .btn:disabled { opacity: .4; }
.recorder .cnote { border-bottom-color: rgba(255, 255, 255, .12); color: #cfe1f0; }
.recorder .cnote-at { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); color: #fff; }
.recorder .cnote-at:hover { background: var(--gold); color: #2a1f00; }

/* ---------------- call audio ---------------- */
.audio-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filebtn {
  display: inline-block; margin: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  color: #fff; border-radius: var(--r-sm); padding: .55rem 1.1rem;
  font-size: .92rem; font-weight: 650;
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255,255,255,.13);
}
.filebtn:hover { filter: brightness(1.07); }
.filebtn input { display: none; }
#rv-audio { width: 100%; margin-bottom: .9rem; }
.note-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.note-row input { flex: 1; min-width: 12rem; }
.cnote {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem;
}
.cnote:last-child { border-bottom: 0; }
.cnote span { flex: 1; }
.cnote-at {
  background: #eaf1f8; border: 1px solid #d9e5f0; color: var(--navy-mid);
  border-radius: 999px; padding: .1rem .55rem; font: inherit;
  font-size: .78rem; font-weight: 800; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.cnote-at:hover { background: var(--navy-mid); color: #fff; }

/* ---------------- carrier contact ---------------- */
.c-phone {
  display: inline-block; font-weight: 800; font-size: 1.05rem;
  color: var(--navy); text-decoration: none; letter-spacing: -.01em;
  margin-top: .15rem;
}
.c-phone:hover { color: var(--navy-mid); text-decoration: underline; }
.c-phonenote { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.c-products { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.c-prod {
  font-size: .72rem; font-weight: 700; color: var(--good);
  background: var(--good-bg); border: 1px solid #c2e6d3;
  border-radius: 999px; padding: .1rem .5rem;
}

/* ---------------- advanced disclosure ---------------- */
.advanced summary {
  cursor: pointer; font-weight: 800; color: var(--ink);
  font-size: 1.02rem; list-style: none;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "+ "; color: var(--muted); }
.advanced[open] summary::before { content: "- "; }
.advanced h3 { margin-top: 1.2rem; }

@media (max-width: 800px) {
  .appt { grid-template-columns: 1fr; }
  .appt-when { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 0 0 .5rem; }
  .appt-actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---------------- modal ---------------- */
.modal-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 27, 46, .55);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 3vw; overflow-y: auto;
  animation: fade .18s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--r-lg);
  width: min(640px, 100%);
  box-shadow: 0 30px 70px rgba(8, 27, 46, .38);
  animation: pop .22s var(--ease);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(-10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { margin: 0; }
.x {
  background: none; border: 0; font-size: 1.6rem; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0 .2rem;
  transition: color .15s var(--ease);
}
.x:hover { color: var(--ink); }
#modal-form { padding: .4rem 1.35rem 1.35rem; }
#modal-form label:first-child { margin-top: .4rem; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: .5rem;
  padding: 1.05rem 1.35rem; border-top: 1px solid var(--line-soft);
  background: #fafcfe;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.toast {
  position: fixed; bottom: 1.4rem; left: 50%;
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: .65rem 1.2rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600; z-index: 80;
  box-shadow: 0 10px 30px rgba(8, 27, 46, .35);
  animation: toastin .22s var(--ease);
}
@keyframes toastin {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translateX(-50%); }
}
.toast.bad { background: var(--bad); }

/* ---------------- waiting for approval ---------------- */
.waiting { max-width: 520px; margin: 3rem auto; text-align: center; }
.waiting h1 { font-size: 1.5rem; }
.waiting .row-between { justify-content: center; }
.pendingtag {
  display: inline-block; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  background: #fdf2da; color: #855403; border: 1px solid #f4e2b4;
  border-radius: 999px; padding: .06rem .45rem; vertical-align: middle;
}
.waiting-row { background: #fffdf6; }

/* ---------------- profile ---------------- */
.pf-head {
  display: flex; align-items: center; gap: 1.1rem;
  padding: 1.4rem 1.5rem; margin-bottom: 1.2rem;
  border-radius: var(--r-lg); color: #cfe1f0;
  background:
    radial-gradient(26rem 12rem at 92% -40%, rgba(242, 193, 78, .2), transparent 65%),
    linear-gradient(125deg, var(--navy-deep), var(--navy) 58%, var(--navy-mid));
  box-shadow: var(--sh-3);
}
.pf-avatar {
  flex: 0 0 auto; width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; color: #2a1f00;
  background: linear-gradient(160deg, var(--gold-lit), var(--gold));
  box-shadow: 0 6px 18px rgba(217, 154, 18, .4), inset 0 1px 0 rgba(255,255,255,.5);
}
.pf-who { min-width: 0; }
.pf-who h1 {
  color: #fff; font-size: 1.5rem; margin: 0 0 .1rem;
  letter-spacing: -.025em; overflow-wrap: anywhere;
}
.pf-who p { color: #a9c8e0; margin: 0 0 .5rem; font-size: .9rem; overflow-wrap: anywhere; }
.pf-badges { display: flex; gap: .35rem; flex-wrap: wrap; }

/* the save bar: quiet until there is something to save */
.savebar {
  position: sticky; bottom: 1rem; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: .75rem 1.1rem;
  box-shadow: var(--sh-2); margin-bottom: 1.15rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.savebar.on { border-color: var(--gold); box-shadow: var(--sh-3), 0 0 0 3px rgba(217,154,18,.14); }
.savebar.saved { border-color: #b6e0c8; box-shadow: var(--sh-2), 0 0 0 3px rgba(20,122,82,.14); }
.save-state {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .9rem; font-weight: 600; color: var(--muted);
}
.save-state.unsaved { color: #855403; }
.save-state.ok { color: var(--good); animation: popin .32s var(--ease); }
.save-state.ok svg {
  background: var(--good); color: #fff; border-radius: 50%;
  padding: 2px; width: 17px; height: 17px;
}
@keyframes popin {
  0% { opacity: 0; transform: scale(.85); }
  60% { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 620px) {
  .pf-head { flex-direction: column; align-items: flex-start; text-align: left; }
  .savebar { flex-direction: column; align-items: stretch; }
  .savebar .btn { width: 100%; }
}

/* ---------------- accounts ---------------- */
.whoami {
  position: absolute; top: .9rem; right: 3vw;
  display: flex; align-items: center; gap: .7rem;
  font-size: .84rem; color: #9fbcd6;
}
.whoami span { font-weight: 650; color: #cfe1f0; }
.whoami a { color: #9fbcd6; font-weight: 600; text-decoration: none; }
.whoami a:hover { color: #fff; }

.team-row {
  display: grid; grid-template-columns: 1fr auto auto auto;
  gap: .7rem; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid var(--line-soft);
}
.team-row:last-child { border-bottom: 0; }
.team-who b { display: block; color: var(--ink); }
.team-who .muted { display: block; font-size: .82rem; }

.alt-link { margin-top: 1.1rem; font-size: .9rem; text-align: center; color: var(--muted); }
.alt-link a { font-weight: 650; }

@media (max-width: 620px) {
  .whoami { position: static; padding: .2rem 3vw .5rem; }
  .team-row { grid-template-columns: 1fr auto; }
  .team-row .works { grid-column: 1 / -1; }
}

/* ---------------- login ---------------- */
.login-body {
  min-height: 100vh; margin: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6vh 5vw;
  background:
    radial-gradient(38rem 22rem at 18% 12%, rgba(242, 193, 78, .2), transparent 62%),
    radial-gradient(34rem 22rem at 88% 88%, rgba(27, 74, 114, .5), transparent 62%),
    linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 55%, #16405f 100%);
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.3rem;
  width: min(410px, 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: pop .35s var(--ease);
}
.login-brand {
  display: flex; align-items: center; gap: .55rem;
  color: var(--navy); font-weight: 800; font-size: 1.2rem;
  letter-spacing: -.02em; margin-bottom: 1.5rem;
}
.login-brand svg { color: var(--gold); }
.login-card h1 { font-size: 1.45rem; margin-bottom: .35rem; }
.login-card .hint { margin-bottom: 1.3rem; }
.login-error {
  background: var(--bad-bg); border: 1px solid #f2cbbc;
  border-left: 4px solid var(--bad);
  color: #8a3417; border-radius: var(--r-sm);
  padding: .65rem .85rem; font-size: .9rem;
}

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .two-col, .sum-grid, .f-row.f4 { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; padding: 1.4rem 1.4rem 1.3rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero-week { gap: 1.6rem; }
}
@media (max-width: 620px) {
  body { font-size: 15px; }
  h1 { font-size: 1.42rem; }
  .wrap { padding-top: 1.3rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; text-align: center; }
  .two-col, .sum-grid, .f-row.f2, .f-row.f4 { grid-template-columns: 1fr; }
  .head { align-items: stretch; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; text-align: center; }
  .seg { display: flex; width: 100%; }
  .seg-btn { flex: 1; text-align: center; }
  .cell-notes { max-width: 12rem; }
  .eapp-row { grid-template-columns: 1fr; gap: .1rem; }
  .eapp-c { text-align: left; opacity: 1; }
}

/* ---------------- who takes it ---------------- */
.wtc { margin-bottom: 1.4rem; }
.wtc-pick {
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  margin: .9rem 0 .2rem;
}
.wtc-pick .search { margin: 0; flex: 1 1 240px; max-width: 380px; }
.wtc-chips {
  display: flex; flex-wrap: wrap; gap: .4rem;
  max-height: 15rem; overflow-y: auto;
  padding: .7rem; margin-top: .2rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg);
}
.wtc-chip {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .3rem .65rem .3rem .5rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); cursor: pointer;
  font-size: .82rem; color: var(--body);
  transition: border-color .12s var(--ease), background .12s var(--ease);
}
.wtc-chip:hover { border-color: var(--navy-mid); }
.wtc-chip.on {
  background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600;
}
.wtc-chip input { margin: 0; accent-color: var(--gold); }
.wtc-picked { margin: .7rem 0 0; font-size: .85rem; color: var(--ink); }
.wtc-best {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  margin-top: 1.1rem; padding: .85rem 1rem;
  border-radius: var(--r); border: 1px solid #c2e6d3;
  background: linear-gradient(180deg, #f1fbf5, #fff);
}
.wtc-best.soft { border-color: #f4e2b4; background: linear-gradient(180deg, #fffaf0, #fff); }
.wtc-best-k {
  font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.wtc-best b { color: var(--ink); font-size: 1.02rem; }
.wtc-best-w { flex: 1 1 100%; font-size: .84rem; color: var(--body); }
.wtc-because { margin: .35rem 0 .1rem; font-size: .8rem; color: var(--body); }
.wtc-because b { color: var(--ink); }
.wtc-detail { list-style: none; margin: .4rem 0 0; padding: 0; }
.wtc-detail li {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; margin-top: .2rem;
}
.wtc-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--muted);
}
.wtc-dot.yes { background: var(--good); }
.wtc-dot.maybe { background: var(--gold); }
.wtc-dot.no { background: var(--bad); }
.wtc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.wtc-col {
  border: 1px solid var(--line);
  border-top: 3px solid var(--muted);
  border-radius: var(--r);
  background: var(--bg);
  padding: .95rem 1rem 1.05rem;
}
.wtc-col.ok { border-top-color: var(--good); }
.wtc-col.warn { border-top-color: var(--gold); }
.wtc-col.bad { border-top-color: var(--bad); }
.wtc-col h3 {
  margin: 0; font-size: .95rem; color: var(--ink);
  display: flex; align-items: center; gap: .45rem;
}
.wtc-n {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; min-width: 1.5rem; text-align: center;
  font-size: .74rem; padding: .05rem .4rem; color: var(--body);
}
.wtc-sub { margin: .3rem 0 .75rem; font-size: .8rem; color: var(--muted); }
.wtc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.wtc-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .6rem .7rem .65rem;
  box-shadow: var(--sh-1);
}
.wtc-name { font-weight: 700; color: var(--ink); font-size: .9rem; }
.wtc-meta {
  display: flex; align-items: center; gap: .45rem;
  flex-wrap: wrap; margin: .35rem 0 .35rem;
}
.wtc-shelf { font-size: .75rem; color: var(--muted); }
.wtc-prods {
  margin: .1rem 0 .35rem; font-size: .74rem; color: var(--muted);
}
.wtc-why { margin: 0; font-size: .82rem; line-height: 1.5; }
.wtc-none { margin: 0; font-size: .84rem; color: var(--muted); }
.wtc-foot { margin: 1rem 0 0; font-size: .8rem; color: var(--muted); }
.badge.mine {
  background: #efe8fb; color: #573ba3; border-color: #ddd2f3;
  font-size: .68rem;
}

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

/* ---------------- hidden elements (keep last) ---------------- */
/* The `hidden` attribute is only display:none in the UA stylesheet, so any
   author rule that sets display (e.g. .modal-back{display:flex}) silently
   beats it and the element stays on screen forever. This makes `hidden`
   win everywhere, which is what the JS assumes when it toggles el.hidden. */
[hidden] { display: none !important; }
/* Belt and braces: these two are the elements the JS toggles, and a plain
   [hidden] rule ties on specificity with .modal-back, so name them here to
   win on specificity as well as on !important. */
.modal-back[hidden], .toast[hidden] { display: none !important; }
