/* ————— William Switchboard ————— */
:root {
  --ink: #17130f;
  --paper: #fffdfa;
  --gray: #8a827a;
  --gray-2: #b5ada4;
  --hair: #ece6de;
  --red: #e0452f;
  --red-deep: #c93a26;
  --red-soft: #fbeae6;
  --green: #24875a;
  --green-soft: #e4f4eb;
  --amber: #a97812;
  --amber-soft: #fbf2df;
  --blue: #3a6fbe;
  --blue-soft: #e8f0fb;
  --sans: "Inter", -apple-system, system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.45;
}
/* atmosphere: soft washes fading into paper */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(90rem 44rem at 82% -18%, rgba(122, 160, 216, 0.16), transparent 60%),
    radial-gradient(70rem 40rem at -12% -6%, rgba(224, 69, 47, 0.10), transparent 55%),
    radial-gradient(60rem 50rem at 50% 120%, rgba(224, 69, 47, 0.05), transparent 60%),
    var(--paper);
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
/* app-like touch: no double-tap zoom, no grey tap flash, no long-press callout */
* { -webkit-tap-highlight-color: transparent; }
button, a, .key, .card, .recrow, .smcard, .switch { touch-action: manipulation; }
/* 16px+ keeps iOS Safari from zooming when a field is focused */
input[type="text"], input[type="tel"], input[type="password"], select, textarea { font-size: 16px; }
.boot { padding: 40vh 0; text-align: center; color: var(--gray-2); font-size: 14px; }

/* ————— pills ————— */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 9px 18px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.pill:active { transform: scale(.96); }
.pill-red {
  background: var(--red); color: #fff;
  box-shadow: 0 6px 18px -8px rgba(224, 69, 47, .55);
}
.pill-red:hover { background: var(--red-deep); }
.pill-quiet {
  background: #fff; border: 1px solid var(--hair); color: var(--ink);
}
.pill-quiet:hover { border-color: var(--gray-2); }
.pill-ghost { color: var(--gray); padding: 9px 10px; }
.pill-ghost:hover { color: var(--ink); }

/* status capsules */
.cap {
  display: inline-block; padding: 3.5px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
}
.cap-green  { background: var(--green-soft); color: var(--green);  border: 1px solid #c9e9d6; }
.cap-amber  { background: var(--amber-soft); color: var(--amber);  border: 1px solid #f0dfb6; }
.cap-blue   { background: var(--blue-soft);  color: var(--blue);   border: 1px solid #cdddf3; }
.cap-gray   { background: #f3f0ec;           color: var(--gray);   border: 1px solid var(--hair); }
.cap-red    { background: var(--red-soft);   color: var(--red);    border: 1px solid #f3cfc7; }

/* ————— lockup ————— */
.lockup { font-weight: 900; letter-spacing: -0.035em; color: var(--ink); }
.lockup em {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: var(--red); letter-spacing: -0.01em; margin-left: 1px;
}

/* ————— login ————— */
.login {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0; padding: 24px;
}
.login .lockup { font-size: clamp(52px, 11vw, 108px); line-height: .95; animation: rise .7s cubic-bezier(.2,.8,.25,1) both; }
.login .cap-line { margin-top: 18px; color: var(--gray); font-size: 15px; animation: rise .7s .08s cubic-bezier(.2,.8,.25,1) both; }
.login form { margin-top: 44px; display: flex; gap: 10px; animation: rise .7s .16s cubic-bezier(.2,.8,.25,1) both; }
.login input {
  width: min(280px, 60vw); padding: 13px 22px; border-radius: 999px;
  border: 1px solid var(--hair); background: #fff; outline: none; font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.login input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23,19,15,.06); }
.login .pill-red { padding: 13px 26px; font-size: 15px; }
.login.err form { animation: shake .4s ease; }
@keyframes shake { 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }

/* ————— app shell ————— */
.wrap { max-width: 860px; margin: 0 auto; padding: 28px 22px 120px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.topbar .lockup { font-size: 20px; }
.topbar .seg button { padding: 7px 15px; }
.hero { margin-top: 60px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero h1.lockup { font-size: clamp(56px, 10vw, 96px); line-height: .92; animation: rise .6s cubic-bezier(.2,.8,.25,1) both; }
.hero .sub { margin-top: 16px; color: var(--gray); font-size: 15px; max-width: 42ch; animation: rise .6s .06s cubic-bezier(.2,.8,.25,1) both; }
.hero .pill-red { animation: rise .6s .1s cubic-bezier(.2,.8,.25,1) both; }

/* stats: numbers are heroes */
.stats { margin-top: 54px; display: flex; gap: clamp(28px, 7vw, 76px); animation: rise .6s .12s cubic-bezier(.2,.8,.25,1) both; }
.stat .n {
  font-family: var(--serif); font-weight: 560; font-size: clamp(40px, 6.4vw, 58px);
  line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.stat .l { margin-top: 7px; color: var(--gray); font-size: 12.5px; }

/* editorial divider */
.divider { display: flex; align-items: center; gap: 16px; margin: 52px 0 22px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.divider span {
  border: 1px solid var(--hair); background: #fff; border-radius: 999px;
  padding: 5px 15px; font-size: 12px; font-weight: 700; color: var(--gray);
}

/* twilio banner */
.banner {
  margin-top: 26px; border: 1px solid #f0dfb6; background: var(--amber-soft);
  border-radius: 18px; padding: 15px 19px; font-size: 13.5px; color: var(--amber);
  animation: rise .6s .15s cubic-bezier(.2,.8,.25,1) both;
}
.banner b { font-weight: 700; }
.banner code { font-family: ui-monospace, monospace; font-size: 12px; background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 6px; }

/* ————— line cards ————— */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--hair); border-radius: 20px;
  padding: 20px 22px; display: flex; align-items: center; gap: 18px;
  box-shadow: 0 1px 2px rgba(23,19,15,.03);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  animation: rise .55s cubic-bezier(.2,.8,.25,1) both;
  cursor: pointer;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -14px rgba(23,19,15,.18); border-color: #e2dbd2; }
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 84px;
  background: linear-gradient(90deg, var(--edge, transparent), transparent);
  opacity: .5; pointer-events: none;
}
.card.s-live    { --edge: var(--green-soft); }
.card.s-dnd     { --edge: var(--amber-soft); }
.card.s-holiday { --edge: var(--blue-soft); }
.card.s-off     { --edge: #f3f0ec; }
.card .who { flex: 1; min-width: 0; position: relative; }
.card .name { font-weight: 800; font-size: 16.5px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.card .num { color: var(--gray); font-size: 13px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.card .route { color: var(--gray); font-size: 12.5px; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .route em { font-style: normal; color: var(--red); font-weight: 600; }
.card .acts { display: flex; gap: 8px; align-items: center; }
.cards .empty {
  text-align: center; color: var(--gray-2); padding: 70px 20px; font-size: 14.5px;
  border: 1.5px dashed var(--hair); border-radius: 22px; animation: rise .55s both;
}
.cards .empty .big { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--gray); margin-bottom: 8px; }

/* ————— sheet ————— */
.overlay {
  position: fixed; inset: 0; background: rgba(23, 19, 15, .32);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .28s ease; z-index: 40;
}
.overlay.on { opacity: 1; }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 50;
  width: min(680px, 100vw);
  max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  transform: translate(-50%, 104%);
  transition: transform .42s cubic-bezier(.22, .9, .3, 1);
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(48rem 22rem at 88% -8%, rgba(122,160,216,.14), transparent 60%),
    radial-gradient(40rem 20rem at -8% -4%, rgba(224,69,47,.09), transparent 55%),
    #fffdfb;
  box-shadow: 0 -18px 60px -20px rgba(23,19,15,.35);
  padding: 12px 26px calc(28px + env(safe-area-inset-bottom));
}
.sheet.on { transform: translate(-50%, 0); }
.sheet .handle { width: 40px; height: 4.5px; border-radius: 3px; background: #ddd5cb; margin: 6px auto 22px; }
.sheet h2.big-name {
  font-family: var(--serif); font-weight: 560; font-size: clamp(30px, 6vw, 42px);
  letter-spacing: -0.02em; line-height: 1.05;
}
.sheet input.big-name {
  font-family: var(--serif); font-weight: 560; font-size: clamp(30px, 6vw, 42px);
  letter-spacing: -0.02em; border: 0; outline: none; background: transparent; width: 100%;
  padding: 0; line-height: 1.15;
}
.sheet input.big-name::placeholder { color: #d8d0c6; }
.sheet .sect { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--hair); }
.sheet .sect:first-of-type { border-top: 0; padding-top: 0; }
.sheet .sect > h3 { font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; }
.sheet .sect > .hint { color: var(--gray); font-size: 12.5px; margin-top: 3px; max-width: 52ch; }
.sheet .sect .body { margin-top: 14px; }

.field input[type="text"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; padding: 11px 16px; border-radius: 14px; border: 1px solid var(--hair);
  background: #fff; outline: none; font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23,19,15,.05);
}
.field + .field { margin-top: 10px; }
.flabel { font-size: 11.5px; font-weight: 600; color: var(--gray); margin: 0 0 5px 4px; }

/* segmented pill control */
.seg { display: inline-flex; background: #f3efe9; border-radius: 999px; padding: 3.5px; gap: 2px; }
.seg button {
  padding: 7.5px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--gray);
  transition: all .22s ease;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(23,19,15,.09); }

/* switch */
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: #e7e1d8; transition: background .25s ease; flex: none; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(23,19,15,.2);
  transition: transform .25s cubic-bezier(.3,.9,.35,1.2);
}
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }
.switchrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switchrow .t { font-size: 14px; font-weight: 600; }
.switchrow .d { font-size: 12.5px; color: var(--gray); margin-top: 2px; max-width: 46ch; }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 4px; background: #f3efe9; border-radius: 999px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; background: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 1px 4px rgba(23,19,15,.08); }
.stepper .v { min-width: 64px; text-align: center; font-family: var(--serif); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper .v small { font-family: var(--sans); font-size: 12px; color: var(--gray); font-weight: 500; }

/* forward number rows */
.fwd { display: flex; gap: 8px; align-items: center; }
.fwd + .fwd { margin-top: 8px; }
.fwd input.lab { flex: 0 0 32%; }
.fwd input.ph { flex: 1; }
.fwd .x { color: var(--gray-2); font-size: 17px; padding: 6px; }
.fwd .x:hover { color: var(--red); }

/* hours grid */
.hours { display: flex; flex-direction: column; gap: 7px; }
.hrow { display: flex; align-items: center; gap: 10px; }
.hrow .day {
  width: 52px; text-align: center; padding: 7px 0; border-radius: 999px; font-size: 12px;
  font-weight: 700; border: 1px solid var(--hair); color: var(--gray-2); background: #fff;
  transition: all .2s ease;
}
.hrow .day.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.hrow input[type="time"] {
  padding: 7px 10px; border-radius: 11px; border: 1px solid var(--hair); background: #fff;
  font-size: 13px; outline: none;
}
.hrow input[type="time"]:disabled { opacity: .35; }
.hrow .dash { color: var(--gray-2); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 13px;
  background: #fff; border: 1px solid var(--hair); border-radius: 999px; font-size: 12.5px;
  font-weight: 600; font-variant-numeric: tabular-nums; animation: pop .25s ease both;
}
.chip button { color: var(--gray-2); font-size: 14px; line-height: 1; }
.chip button:hover { color: var(--red); }
.chips input {
  border: 0; outline: none; background: transparent; font-size: 13.5px; padding: 7px 4px; min-width: 150px;
}
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

/* dnd quick pills */
.dndrow { display: flex; gap: 8px; flex-wrap: wrap; }
.dndrow .pill-quiet.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* number picker */
.numpick .row { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--hair); font-size: 14px; }
.numpick .row:last-child { border-bottom: 0; }
.numpick .meta { color: var(--gray); font-size: 12px; }
.searchrow { display: flex; gap: 8px; margin-top: 10px; }
.searchrow input { flex: 1; }

/* sheet footer */
.sheet .foot {
  /* plain sticky, no negative-margin tricks — iOS pinned this mid-screen */
  position: sticky; bottom: 0; margin: 34px -26px 0;
  padding: 16px 26px calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(transparent, #fffdfb 32%);
}
.sheet:has(.foot) { padding-bottom: 0; }
.sheet .foot .grp { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.del { color: var(--gray-2); font-size: 13px; }
.del:hover { color: var(--red); }
.pill-red.saved { background: var(--green); box-shadow: 0 6px 18px -8px rgba(36,135,90,.5); }

/* calls list */
.calls .crow {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px;
  border-bottom: 1px solid var(--hair); font-size: 13.5px;
  animation: rise .4s ease both;
}
.calls .crow .when { color: var(--gray); width: 84px; flex: none; font-size: 12.5px; }
.calls .crow .from { flex: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.calls .crow .dur { color: var(--gray); font-size: 12.5px; width: 48px; text-align: right; }
.calls .none { color: var(--gray-2); text-align: center; padding: 44px 0 30px; font-size: 14px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 0); z-index: 90;
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 12px 34px -10px rgba(23,19,15,.5);
  animation: rise .3s ease both;
}
.toast.bad { background: var(--red); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sheet .foot .pill-red { animation: none; }

@media (max-width: 560px) {
  .card { flex-wrap: wrap; }
  .card .acts { width: 100%; justify-content: flex-end; }
  .stats { gap: 30px; }
  .fwd input.lab { flex-basis: 38%; }
}

/* ————— Cold Caller ————— */
.smpick { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.smcard {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px; text-align: left;
  background: #fff; border: 1.5px solid var(--hair); border-radius: 22px; width: 100%;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.smcard:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -18px rgba(23,19,15,.25); border-color: #e2dbd2; }
.smcard:active { transform: scale(.985); }
.smcard.off { opacity: .55; }
.smcard .ava {
  width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; flex: none;
  display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px;
}
.smcard .ava.plus { background: #f3f0ec; color: var(--gray); font-family: var(--sans); font-style: normal; font-size: 24px; }
.smcard .smmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.smcard .smname { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.smcard .smnum { color: var(--gray); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.smcard .smnum.warn { color: var(--amber); font-weight: 600; }
.smcard .smscore { display: flex; gap: 14px; flex: none; }
.smcard .smscore span { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--gray); font-size: 10px; }
.smcard .smscore b { font-family: var(--serif); font-style: italic; font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.smcard .smscore .g b { color: var(--green); }
.smcard .smscore .b b { color: var(--blue); }
.smcard .smscore .r b { color: var(--red); }

.dashhead { margin-top: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dashwho { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dashwho .ava {
  width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: #fff; flex: none;
  display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px;
}
.dashname { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 28px; letter-spacing: -0.02em; line-height: 1.05; }
.dashnum { color: var(--gray); font-size: 12.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.dashnum .warn { color: var(--amber); font-weight: 600; }
.dashacts { display: flex; gap: 6px; align-items: center; }

.scoreband {
  margin-top: 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.scoreband .stat {
  background: #fff; border: 1px solid var(--hair); border-radius: 16px;
  padding: 15px 8px 13px; text-align: center; min-width: 0;
}
.scoreband .n {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: clamp(28px, 5vw, 42px); line-height: 1; letter-spacing: -0.02em;
}
.scoreband .n.green { color: var(--green); }
.scoreband .n.blue  { color: var(--blue); }
.scoreband .n.red   { color: var(--red); }
.scoreband .l { margin-top: 7px; color: var(--gray); font-size: 11px; letter-spacing: .01em; }

.dialgrid { margin-top: 30px; display: grid; grid-template-columns: 400px 1fr; gap: 30px; align-items: start; }
@media (max-width: 780px) { .dialgrid { grid-template-columns: 1fr; } }
.dialcard {
  background: #fff; border: 1px solid var(--hair); border-radius: 28px;
  padding: 34px 28px 30px; box-shadow: 0 18px 50px -30px rgba(23,19,15,.25);
}
.dialnum { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; }
.dialdisplay {
  width: 100%; min-width: 0; text-align: center; font-size: 33px; font-weight: 300;
  letter-spacing: .01em; color: var(--ink); font-variant-numeric: tabular-nums;
  line-height: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  user-select: none; -webkit-user-select: none; padding: 0 56px;
}
.dialdisplay.empty { color: var(--gray-2); font-size: 24px; }
.pastebtn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--red); font-weight: 700; font-size: 13.5px; padding: 8px 10px;
}
.pastebtn:active { opacity: .5; }
.dialcard { --keysize: 78px; }
.keypad {
  margin: 22px auto 0; display: grid; grid-template-columns: repeat(3, var(--keysize));
  gap: 16px 22px; justify-content: center;
}
.key {
  width: var(--keysize); height: var(--keysize); border-radius: 50%; background: #f4f1ec;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: background .12s, transform .06s; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.key:active { background: #e7e2da; transform: scale(.94); }
.key .d { font-size: 29px; font-weight: 400; line-height: 1.05; }
.key .sub { font-size: 9.5px; font-weight: 700; letter-spacing: .16em; color: var(--gray); height: 12px; }
.callrow { margin-top: 20px; display: grid; grid-template-columns: var(--keysize) var(--keysize) var(--keysize); gap: 16px 22px; justify-content: center; align-items: center; }
.callbtn {
  width: var(--keysize); height: var(--keysize);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; border-radius: 50%; background: #34c759; color: #fff;
  display: grid; place-items: center; transition: transform .1s, filter .15s, opacity .2s;
  box-shadow: 0 10px 24px -10px rgba(52,199,89,.55);
}
.callbtn:hover { filter: brightness(1.04); }
.callbtn:active { transform: scale(.93); }
.callbtn[disabled] { opacity: .35; cursor: not-allowed; box-shadow: none; }
.keyghost { width: var(--keysize); height: var(--keysize); display: grid; place-items: center; color: var(--gray); border-radius: 50%; }
.keyghost.del:active { transform: scale(.92); }

.callscreen { text-align: center; padding: 34px 0 20px; }
.callscreen .csnum { font-size: 33px; font-weight: 300; font-variant-numeric: tabular-nums; }
.callscreen .csstate { margin-top: 10px; color: var(--gray); font-size: 14px; }
.callscreen .cstimer { margin-top: 4px; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; min-height: 22px; }
.endbtn {
  margin: 26px auto 0; width: 78px; height: 78px; border-radius: 50%; background: #ff3b30; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 24px -10px rgba(255,59,48,.55);
  transition: transform .1s;
}
.endbtn:active { transform: scale(.93); }
.callscreen .cshint { margin-top: 18px; color: var(--gray-2); font-size: 12.5px; max-width: 30ch; margin-left: auto; margin-right: auto; }

.reccol { min-width: 0; }
.recents { background: #fff; border: 1px solid var(--hair); border-radius: 20px; overflow: hidden; }
.recrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; cursor: pointer; border-bottom: 1px solid var(--hair);
  transition: background .12s;
}
.recrow:last-child { border-bottom: 0; }
.recrow:hover { background: #fbf9f6; }
.recname { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recphone { color: var(--gray); font-weight: 400; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.recrate { color: var(--amber); font-size: 12px; font-weight: 700; }
.recmeta { margin-top: 4px; color: var(--gray); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.rectime { color: var(--gray-2); font-size: 12px; white-space: nowrap; }

.leadsub { margin-top: 6px; color: var(--gray); font-size: 13px; }
.statuschips { display: flex; gap: 8px; flex-wrap: wrap; }
.statuschips .pill { text-transform: capitalize; }
.prewrap { white-space: pre-wrap; font-size: 13px; color: var(--ink); background: #faf8f5; border: 1px solid var(--hair); border-radius: 14px; padding: 14px 16px; max-height: 300px; overflow: auto; }
.transcript {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11.5px;
  color: var(--gray); background: #faf8f5; border: 1px solid var(--hair); border-radius: 14px;
  padding: 14px 16px; max-height: 340px; overflow: auto;
}
.callline { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--hair); font-size: 13px; }
.callline:last-child { border-bottom: 0; }
.dirarrow { color: var(--green); font-weight: 800; }
.dirarrow.in { color: var(--blue); }
.calldur { font-variant-numeric: tabular-nums; color: var(--ink); }
.calltime { color: var(--gray-2); font-size: 12px; margin-left: auto; }
.playrec { padding: 5px 12px; }
.smstats { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.smstats .stat { background: #faf8f5; border: 1px solid var(--hair); border-radius: 14px; padding: 13px 6px 11px; text-align: center; min-width: 0; }
.smstats .n {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: clamp(24px, 5.5vw, 34px); line-height: 1; letter-spacing: -0.02em;
}
.smstats .n.green { color: var(--green); }
.smstats .n.blue { color: var(--blue); }
.smstats .n.red { color: var(--red); }
.smstats .l { margin-top: 6px; color: var(--gray); font-size: 10.5px; }

/* ————— Cold Caller · phone-first ————— */
@media (max-width: 640px) {
  .dashwrap { padding: 18px 14px 90px; }
  .dashhead { margin-top: 26px; }
  .dashwho .ava { width: 44px; height: 44px; font-size: 20px; }
  .dashname { font-size: 23px; }
  .dashacts .pill { padding: 8px 14px; font-size: 12.5px; }
  .scoreband { margin-top: 20px; grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .scoreband .stat { padding: 16px 8px 14px; }
  .scoreband .n { font-size: clamp(30px, 9vw, 40px); }
  .scoreband .l { font-size: 11px; }
  .smstats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .smpick { margin-top: 28px; grid-template-columns: 1fr; }
  .smcard { padding: 17px 18px; }
  .smcard .smscore { gap: 11px; }
  .dialgrid { margin-top: 20px; gap: 22px; }
  .dialcard { --keysize: clamp(62px, 19.5vw, 76px); padding: 24px 14px 22px; border-radius: 26px; }
  .keypad { gap: 12px 16px; margin-top: 16px; }
  .callrow { gap: 12px 16px; margin-top: 14px; }
  .key .d { font-size: 26px; }
  .dialdisplay { font-size: 29px; line-height: 46px; padding: 0 52px; }
  .callscreen { padding: 24px 0 12px; }
  .callscreen .csnum { font-size: 29px; }
  .recrow { padding: 14px 15px; }
  .rectime { font-size: 11px; }
  .hero h1.lockup { font-size: clamp(46px, 14vw, 72px); }
}
@media (max-width: 380px) {
  .dialcard { --keysize: 58px; }
}

/* caller-ID verification block */
.cidrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cidrow .t { font-weight: 700; font-size: 14px; }
.cidrow.ok .t { color: var(--green); }
.cidrow .d { color: var(--gray); font-size: 12px; margin-top: 3px; }
.cidverify { text-align: center; padding: 8px 0; }
.cidverify .d { color: var(--gray); font-size: 13px; max-width: 40ch; margin: 0 auto; }
.cidcode {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 46px; letter-spacing: .12em; color: var(--red); margin: 14px 0; line-height: 1;
}

/* ————— Cold Caller · feel ————— */
/* instant, obvious key feedback (no 300ms lag, no sticky :hover on touch) */
.key { transition: background .09s ease, transform .09s ease; }
.key:active { background: #ddd7cd; transform: scale(.92); }
@media (hover: none) { .key:hover { background: #f4f1ec; } .smcard:hover { transform: none; box-shadow: none; border-color: var(--hair); } .card:hover { transform: none; } .recrow:hover { background: #fff; } }
.callbtn:active:not([disabled]) { transform: scale(.9); }
.callbtn[disabled] { pointer-events: none; }
/* keep the call button clear of the iPhone home indicator */
.dashwrap { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
/* the dial card holds its height so swapping keypad↔call screen doesn't jump */
.dialcard { min-height: 470px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 640px) { .dialcard { min-height: 420px; } }
/* smooth, non-janky scrolling on iOS */
html { scroll-behavior: auto; }
body { overscroll-behavior-y: none; }

/* ————— Cold Caller · fun & fields ————— */
/* every key flashes its own color — dialing should feel like a game */
.key[data-key="1"] { --kc: #e0452f; } .key[data-key="2"] { --kc: #e8871e; }
.key[data-key="3"] { --kc: #d9a514; } .key[data-key="4"] { --kc: #24875a; }
.key[data-key="5"] { --kc: #18a087; } .key[data-key="6"] { --kc: #3a6fbe; }
.key[data-key="7"] { --kc: #6459d6; } .key[data-key="8"] { --kc: #8e44ad; }
.key[data-key="9"] { --kc: #d6409f; } .key[data-key="0"] { --kc: #17130f; }
.key[data-key="*"] { --kc: #8a827a; } .key[data-key="#"] { --kc: #8a827a; }
.key.hit, .key:active { background: var(--kc, #ddd7cd); color: #fff; transform: scale(.9); }
.key.hit .sub, .key:active .sub { color: rgba(255,255,255,.75); }
.key.hit { box-shadow: 0 0 0 6px color-mix(in srgb, var(--kc) 18%, transparent); }

/* lead sheet: star + booked + quotes + tap-to-copy */
.leadtop { display: flex; align-items: center; gap: 10px; }
.leadtop .big-name { flex: 1; min-width: 0; }
.starbtn { font-size: 30px; line-height: 1; color: #d8d0c6; padding: 4px 6px; flex: none; transition: transform .15s, color .15s; }
.starbtn.on { color: #eab308; }
.starbtn:active { transform: scale(1.25) rotate(8deg); }
.bookedchip {
  display: inline-block; margin-top: 12px; padding: 7px 14px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); border: 1px solid #c9e9d6;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.quoteline {
  font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.5;
  color: var(--ink); padding: 9px 0 9px 16px; border-left: 3px solid var(--red-soft);
  margin-bottom: 6px;
}
.copyable { cursor: pointer; -webkit-user-select: none; user-select: none; }
.copyable .copyhint {
  margin-left: 9px; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--gray-2); text-transform: uppercase; opacity: 0; transition: opacity .15s;
}
.sheet .copyable .copyhint { opacity: .8; }
.copyable:active { opacity: .55; }
.leadsub .copyable { text-decoration: underline dotted var(--gray-2); text-underline-offset: 3px; }

/* recents bar: label + All/Starred */
.recbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.reclabel { font-size: 12px; font-weight: 700; color: var(--gray); border: 1px solid var(--hair); background: #fff; border-radius: 999px; padding: 5px 14px; }
.recseg button { padding: 6px 13px; font-size: 12px; }
.recstar { color: #eab308; margin-right: 6px; }

/* ————— Cold Caller · game feel ————— */
/* solid tone pills — the active status chip wears its meaning */
.pill-tone-green { background: var(--green); color: #fff; box-shadow: 0 6px 18px -8px rgba(36,135,90,.55); }
.pill-tone-blue  { background: var(--blue);  color: #fff; box-shadow: 0 6px 18px -8px rgba(58,111,190,.55); }
.pill-tone-amber { background: var(--amber); color: #fff; box-shadow: 0 6px 18px -8px rgba(169,120,18,.55); }
.pill-tone-red   { background: var(--red);   color: #fff; box-shadow: 0 6px 18px -8px rgba(224,69,47,.55); }
.pill-tone-gray  { background: var(--gray);  color: #fff; }

/* the one-liner: instant recall before the big summary */
.tldrline {
  margin-top: 14px; padding: 12px 16px; border-radius: 14px;
  background: #fff; border: 1px solid var(--hair); border-left: 4px solid var(--red);
  font-family: var(--serif); font-style: italic; font-size: 16.5px; line-height: 1.4;
  box-shadow: 0 6px 18px -14px rgba(23,19,15,.25);
}
.rectldr {
  margin-top: 5px; color: var(--gray); font-size: 12px; font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* micro-interactions */
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
.dialdisplay.pop { animation: pop .16s ease; }
.stat .n.bump { animation: pop .35s cubic-bezier(.2,.8,.3,1.4); }
@keyframes starpop { 0% { transform: scale(.6) rotate(-20deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1); } }
.starbtn.on { animation: starpop .35s cubic-bezier(.2,.8,.3,1.3); }

/* armed call button breathes, inviting the tap */
@keyframes breathe {
  0%, 100% { box-shadow: 0 10px 24px -10px rgba(52,199,89,.55); transform: translateY(0); }
  50% { box-shadow: 0 14px 34px -8px rgba(52,199,89,.8); transform: translateY(-2px); }
}
.callbtn:not([disabled]) { animation: breathe 2.2s ease-in-out infinite; }

/* ringing pulse on the live call screen */
.pulsering {
  width: 88px; height: 88px; border-radius: 50%; margin: 4px auto 20px;
  display: grid; place-items: center; position: relative;
  background: var(--green-soft); color: var(--green);
}
.pulsering::before, .pulsering::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(52,199,89,.5); animation: ping 1.6s cubic-bezier(0,.4,.4,1) infinite;
}
.pulsering::after { animation-delay: .55s; }
@keyframes ping { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.75); opacity: 0; } }
.pulsering.live { background: #34c759; color: #fff; }
.pulsering.live::before, .pulsering.live::after { animation-duration: 2.6s; border-color: rgba(52,199,89,.35); }

/* rows press like buttons */
.recrow:active { transform: scale(.985); background: #f7f4ef; }
.recrow { transition: background .12s, transform .1s; }
.smcard { will-change: transform; }

/* toast: springier, bolder */
.toast { transition: transform .3s cubic-bezier(.2,.9,.3,1.3), opacity .3s; }

/* ————— salesman sign-in / sign-up ————— */
.login form.stack { flex-direction: column; align-items: stretch; width: min(380px, 100%); gap: 9px; }
.login form.stack input { width: 100%; }
.login form.stack .pill-red { margin-top: 4px; }
.login .alt { margin-top: 18px; color: var(--gray-2); font-size: 13px; animation: rise .7s .22s cubic-bezier(.2,.8,.25,1) both; }
.login .linkish { color: var(--gray); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; padding: 4px 2px; }
.login .linkish:hover { color: var(--ink); }
.topbar .topme { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 17px; color: var(--ink); }
.topbar .topme small { font-family: var(--sans); font-style: normal; font-weight: 700; font-size: 10px; letter-spacing: .12em; color: var(--red); margin-left: 8px; vertical-align: middle; }

/* a lead reviewing someone else's dashboard: no keypad, a coaching card */
.reviewcard { text-align: center; padding: 26px 8px 18px; }
.reviewcard .ava { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 28px; }
.reviewcard .t { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.reviewcard .d { margin-top: 8px; color: var(--gray); font-size: 13px; max-width: 30ch; margin-left: auto; margin-right: auto; line-height: 1.5; }
.reviewcard .pill { margin-top: 18px; }

/* ————— second gate (Lines / Ring groups) ————— */
.login.gate { min-height: 62vh; padding-top: 6vh; }
.login.gate .lockup { font-size: clamp(40px, 8vw, 72px); }
.login.gate .cap-line { max-width: 42ch; text-align: center; }
