/*
  Taclus demo platform.

  Two registers:
  1. Founder surfaces (presenter, care, console): the Taclus studio. Slate, cool paper, one daffodil accent,
     Archivo's width axis for headlines. The run log is the one loud thing: a live trace of each run.
  2. Prospect surfaces: the fictional business's own tools (a letting site, an email, a phone, a client portal).
     Each business sets --brand / --brand-ink / --brand-accent on <body>; Taclus chrome stays in the ribbon.

  Tokens follow site/src/styles/global.css. Shared classes used by every demo module (keep these working):
  .presenter .presenter-top .controls .panel .card .stack .btn .btn-primary .btn-sm .chip .qr .small .muted .notice
*/
@font-face {
  font-family: 'Plex Mono Fallback';
  src: local('Menlo'), local('Consolas'), local('DejaVu Sans Mono'), local('Courier New');
  ascent-override: 102.5%;
  descent-override: 27.5%;
}

:root {
  --slate: #24313b;
  --slate-2: #33434f;
  --slate-3: #4a5a66;
  --slate-deep: #1a242c;
  --paper: #eef1ef;
  --paper-2: #e2e7e4;
  --white: #fbfcfb;
  --daffodil: #f4c20d;
  --daffodil-deep: #c99a00;
  --daffodil-soft: #fdf3cc;
  --moss: #2e6b4f;
  --moss-soft: #d5e5dc;
  --line: #c3ccc7;
  --line-soft: #d9dfdc;
  --muted: #56646d;
  --danger: #a3341f;
  --danger-soft: #f6dcd5;
  --warn-ink: #6e5200;
  --warn-soft: #fbedc0;

  --brand: var(--slate);
  --brand-ink: var(--paper);
  --brand-accent: var(--daffodil);

  --font: 'Archivo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Plex Mono Fallback', ui-monospace, monospace;

  --step--2: clamp(0.74rem, 0.73rem + 0.05vw, 0.78rem);
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.44rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.73rem, 1.45rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.07rem, 1.6rem + 2.4vw, 3.4rem);

  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 18px;
  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 2.25rem);
  --shadow-hard-s: 2px 2px 0;
  --shadow-hard-m: 4px 4px 0;
  --shadow-soft: 0 1px 2px rgb(26 36 44 / 0.06), 0 8px 24px -12px rgb(26 36 44 / 0.18);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 260ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgb(36 49 59 / 0.12);
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--slate);
  background: var(--paper);
  font-variation-settings: 'wdth' 100;
  touch-action: manipulation;
  min-height: 100dvh;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.08;
  font-weight: 800;
  font-variation-settings: 'wdth' 118;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 {
  font-size: var(--step-3);
}
h2 {
  font-size: var(--step-2);
}
h3 {
  font-size: var(--step-1);
  font-weight: 700;
}
p {
  margin: 0;
  max-width: 65ch;
  text-wrap: pretty;
}
ul,
ol {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
img,
svg {
  max-width: 100%;
  display: block;
}
:focus-visible {
  outline: 3px solid var(--daffodil-deep);
  outline-offset: 2px;
}
.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.stack > * + * {
  margin-top: var(--space, 1rem);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: var(--step--1);
}
.nums {
  font-variant-numeric: tabular-nums;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 10;
  background: var(--daffodil);
  color: var(--slate);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-s);
  font-weight: 700;
}
.skip-link:focus {
  top: 0.5rem;
}
main {
  padding-block: clamp(1.25rem, 3vw, 2.25rem) 4rem;
}

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  border: 1.5px solid var(--slate);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: var(--white);
  color: var(--slate);
  line-height: 1.2;
  transition:
    background-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.btn:hover {
  background: var(--paper-2);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--daffodil);
  border-color: var(--slate);
  box-shadow: var(--shadow-hard-s) var(--slate);
}
.btn-primary:hover {
  background: #ffd02b;
  box-shadow: var(--shadow-hard-m) var(--slate);
  transform: translate(-1px, -1px);
}
.btn-primary:active {
  box-shadow: 0 0 0 var(--slate);
  transform: translate(2px, 2px);
}
.btn-brand {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}
.btn-brand:hover {
  background: color-mix(in srgb, var(--brand) 86%, #000);
}
.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-soft);
}
.btn-quiet {
  border-color: transparent;
  background: transparent;
}
.btn-quiet:hover {
  background: var(--paper-2);
}
.btn-sm {
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  font-size: var(--step--1);
}
.btn-block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ---------------------------------------------------------------- Forms */
label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: var(--step--1);
}
input,
select,
textarea {
  font: inherit;
  font-size: max(16px, var(--step-0));
  font-weight: 400;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--slate);
  width: 100%;
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--slate-3);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--slate);
  outline: none;
  box-shadow: 0 0 0 3px var(--daffodil);
}
textarea {
  resize: vertical;
}
::placeholder {
  color: #7d8a92;
}
.form {
  display: grid;
  gap: 1rem;
}
.field-error {
  color: var(--danger);
  font-weight: 600;
}

/* ---------------------------------------------------------------- Surfaces */
.card {
  background: var(--white);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-m);
  padding: clamp(1rem, 2.5vw, 1.5rem);
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: clamp(1rem, 2vw, 1.25rem);
}
.panel > h2,
.panel-title {
  font-size: var(--step-1);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.dark {
  background: var(--slate);
  color: var(--paper);
}
.notice {
  border-left: 4px solid var(--daffodil);
  background: var(--daffodil-soft);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-s);
}
.notice-danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}
.notice-ok {
  border-left-color: var(--moss);
  background: var(--moss-soft);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--paper-2);
  font-variant-numeric: tabular-nums;
}
.chip-ok {
  background: var(--moss-soft);
  color: var(--moss);
}
.chip-warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.chip-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------------------------------------------------------------- Demo ribbon (no impersonation: every page says it's a demo) */
.demo-ribbon {
  background: var(--slate-deep);
  color: #c9d2d7;
  font-size: var(--step--2);
  padding: 0.4rem var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}
.demo-ribbon > span {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.demo-ribbon strong {
  color: var(--daffodil);
  font-weight: 700;
}
.demo-ribbon a {
  color: #e7ecee;
}
.ribbon-short {
  display: none;
}
@media (max-width: 40rem) {
  .ribbon-long {
    display: none;
  }
  .ribbon-short {
    display: inline;
  }
}

/* ---------------------------------------------------------------- Fictional business header */
.biz-header {
  background: var(--brand);
  color: var(--brand-ink);
  padding: 0.9rem 0;
}
.biz-header .wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.biz-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--brand-accent);
  color: var(--slate-deep);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-variation-settings: 'wdth' 110;
  flex: none;
}
.biz-name {
  font-weight: 800;
  font-variation-settings: 'wdth' 112;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.is-business h1 {
  font-variation-settings: 'wdth' 100;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------- Presenter header + controls */
.presenter-top {
  display: flex;
  gap: 1.25rem 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}
.crumbs {
  font-size: var(--step--1);
  color: var(--muted);
}
.crumbs a {
  color: var(--slate);
}
.join {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
}
.join-url {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.session-code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1.35em;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0 0.35em 0 0.5em;
}
.qr {
  width: 168px;
  height: 168px;
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-m);
  border: 1.5px solid var(--slate);
  box-shadow: var(--shadow-hard-m) var(--daffodil);
  flex: none;
}
.qr svg {
  width: 100%;
  height: 100%;
}
.controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 0.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.drill {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}
.drill-label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}
@media (max-width: 56rem) {
  .drill {
    padding-left: 0;
    border-left: 0;
  }
}

/* Presenter layout: their world on the left, the live trace on the right. */
.presenter {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.presenter > * {
  min-width: 0;
}

/* ---------------------------------------------------------------- Run log: the live trace */
.runlog-panel {
  background: var(--slate-deep);
  border-color: var(--slate-deep);
  color: #e7ecee;
  padding: 0;
  overflow: hidden;
  position: sticky;
  top: 1rem;
}
.runlog-panel > * + * {
  margin-top: 0;
}
.runlog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid #2c3a45;
}
.runlog-head h2 {
  font-size: var(--step-0);
  font-variation-settings: 'wdth' 112;
  letter-spacing: 0;
  color: #fff;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--2);
  font-weight: 600;
  color: #a9d4bd;
}
.live::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #5fd08f;
  box-shadow: 0 0 0 3px rgb(95 208 143 / 0.18);
}
.runlog-scroll {
  max-height: min(68vh, 40rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.4rem 1.15rem 1rem;
  scrollbar-color: #3b4b57 transparent;
}
.runlog {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
}
.runlog li {
  position: relative;
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0 0.45rem 0;
  animation: step-in var(--dur) var(--ease-out);
}
/* The rail: a dot per step, joined within a run. */
.runlog li::before {
  content: '';
  position: absolute;
  left: 4.6rem;
  top: 0.95rem;
  width: 7px;
  height: 7px;
  margin-left: -0.45rem;
  border-radius: 50%;
  background: #6f8592;
}
.runlog li::after {
  content: '';
  position: absolute;
  left: calc(4.6rem - 0.45rem + 3px);
  top: -0.4rem;
  height: 1.35rem;
  width: 1px;
  background: #3b4b57;
}
.runlog li.run-start::after,
.runlog li:first-child::after {
  display: none;
}
.runlog li.run-start:not(:first-child) {
  margin-top: 0.6rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #34434f;
}
.runlog li.run-start:not(:first-child)::before {
  top: 1.35rem;
}
.t-col {
  display: grid;
  justify-items: start;
  line-height: 1.25;
  padding-top: 0.15rem;
}
.t-rel {
  font-family: var(--mono);
  font-size: 0.86em;
  font-weight: 500;
  color: #f7d96b;
  font-variant-numeric: tabular-nums;
}
.t-rel:empty {
  display: none;
}
.runlog time {
  font-family: var(--mono);
  font-size: 0.78em;
  color: #8193a0;
  font-variant-numeric: tabular-nums;
}
.t-msg {
  padding-left: 0.5rem;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.runlog .k-booked .t-msg,
.runlog .k-sent .t-msg {
  color: #b9e2cb;
}
.runlog .k-booked::before,
.runlog .k-sent::before {
  background: #5fd08f;
}
.runlog .k-error .t-msg,
.runlog .k-retry .t-msg {
  color: #ffc2b4;
}
.runlog .k-error::before,
.runlog .k-retry::before {
  background: #ff8a70;
}
.runlog .k-handoff .t-msg {
  color: #d9e1e5;
}
.runlog .k-ai::before {
  background: #c7b6ff;
}
.tag {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0 0.4rem;
  border-radius: 4px;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 0.08em;
  background: #33434f;
  color: #e7ecee;
}
.tag-ai {
  background: #3d3566;
  color: #ddd3ff;
}
.tag-n8n {
  background: #5c2337;
  color: #ffd0dc;
}
.tag-zapier {
  background: #5e3416;
  color: #ffd9bd;
}
.tag-error,
.tag-retry {
  background: #6a2a1d;
  color: #ffd0c4;
}
.runlog-empty {
  color: #8fa0aa;
  font-size: var(--step--1);
  padding: 0.6rem 0 0.2rem;
}
.runlog:has(li) + .runlog-empty {
  display: none;
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* ---------------------------------------------------------------- How it's built */
.builtwith-panel {
  padding: 0;
}
.builtwith-panel > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-m);
}
.builtwith-panel > summary::-webkit-details-marker {
  display: none;
}
.builtwith-panel > summary::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--slate);
  border-bottom: 2px solid var(--slate);
  transform: rotate(-45deg) translate(-1px, -1px);
  transition: transform var(--dur-fast);
  align-self: center;
}
.builtwith-panel[open] > summary::before {
  transform: rotate(45deg) translate(-2px, -1px);
}
.builtwith-panel > summary:hover {
  background: var(--paper);
}
.summary-title {
  font-weight: 800;
  font-variation-settings: 'wdth' 112;
}
.builtwith {
  list-style: none;
  padding: 0 1.25rem 0.5rem;
  display: grid;
  counter-reset: bw;
}
.builtwith li {
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  gap: 0.15rem 1rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line-soft);
}
.builtwith .tool {
  grid-row: span 2;
  font-weight: 700;
  font-size: var(--step--1);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  text-align: center;
  background: var(--paper-2);
}
.builtwith .tool-n8n {
  background: #fde0e6;
  color: #8a1739;
}
.builtwith .tool-zapier {
  background: #ffe3d1;
  color: #8a3a00;
}
.builtwith .tool-code {
  background: #dbe9e1;
  color: #1f5a3f;
}
.builtwith .why {
  grid-column: 2;
}
.builtwith-note {
  padding: 0 1.25rem 1.1rem;
}

/* ---------------------------------------------------------------- Kanban board (agency CRM) */
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}
.board-col {
  background: var(--paper);
  border-radius: 8px;
  padding: 0.55rem;
  min-height: 8.5rem;
}
.board-col h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--step--1);
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
  color: var(--slate-2);
}
.board-col h3 .chip {
  background: var(--white);
  font-size: var(--step--2);
}
.board-col[data-stage='viewing-booked'] {
  background: color-mix(in srgb, var(--moss-soft) 70%, var(--paper));
}
.board-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-size: var(--step--1);
  margin-bottom: 0.4rem;
  box-shadow: 0 1px 0 rgb(26 36 44 / 0.06);
  animation: step-in var(--dur) var(--ease-out);
}
.board-card .muted {
  display: block;
  line-height: 1.35;
}
.board-card .chip {
  margin-top: 0.35rem;
}

/* Week calendar (agency viewings) */
.cal {
  display: grid;
  grid-template-columns: repeat(var(--days, 5), minmax(0, 1fr));
  gap: 0.4rem;
  font-size: var(--step--1);
}
.cal-day h4 {
  margin: 0 0 0.35rem;
  font-size: var(--step--2);
  font-weight: 700;
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0;
  color: var(--muted);
}
.slot {
  padding: 0.3rem 0.45rem;
  border-radius: 5px;
  background: var(--paper);
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-height: 2.1rem;
}
.slot-booked {
  background: var(--daffodil);
  color: var(--slate);
  font-weight: 700;
  line-height: 1.2;
}
.slot-booked span {
  display: block;
  font-weight: 500;
  font-size: var(--step--2);
}

/* ---------------------------------------------------------------- Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.table th,
.table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.table th {
  font-weight: 600;
  color: var(--muted);
  border-bottom-color: var(--line);
}
.table tbody tr:hover {
  background: color-mix(in srgb, var(--paper) 55%, transparent);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.grid-2 > *,
.grid-3 > * {
  min-width: 0;
}

/* ---------------------------------------------------------------- Letting agent site (Enquiry Autopilot) */
.listings-intro {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
}
.listing {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  text-decoration: none;
  display: grid;
  grid-template-rows: auto 1fr;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast);
}
a.listing:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--slate-3);
}
.house-art {
  aspect-ratio: 16 / 10;
  width: 100%;
  height: auto;
  background: color-mix(in srgb, var(--brand) 10%, #f5f7f6);
}
.listing .body {
  padding: 0.9rem 1rem 1.05rem;
  display: grid;
  gap: 0.2rem;
  align-content: start;
}
.price {
  font-weight: 800;
  font-size: var(--step-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.price small {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-top: 0.35rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.badge-pets {
  color: var(--moss);
  font-weight: 600;
}
.property {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
}
.property .house-art {
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.5rem;
  margin: 0;
}
.facts div {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.facts dt {
  font-size: var(--step--2);
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-weight: 700;
}
.enquiry-card {
  position: sticky;
  top: 1rem;
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
}
.back-link {
  font-size: var(--step--1);
  font-weight: 600;
}

/* Sent */
.sent {
  max-width: 32rem;
  margin: clamp(1rem, 6vw, 4rem) auto;
  text-align: center;
  justify-items: center;
  display: grid;
  gap: 1rem;
}
.sent p {
  margin-inline: auto;
}
.sent-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--brand-ink);
}

/* Email thread: what the applicant gets in their inbox */
.mail-wrap {
  max-width: 44rem;
  margin-inline: auto;
}
.mail-subject {
  font-size: var(--step--1);
  color: var(--muted);
}
.thread {
  display: grid;
  gap: 0.75rem;
}
.mail {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  animation: step-in var(--dur) var(--ease-out);
}
.mail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.15rem 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.mail-avatar {
  grid-row: span 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: var(--paper-2);
  color: var(--slate);
}
.mail-out .mail-avatar {
  background: var(--brand);
  color: var(--brand-ink);
}
.mail-from {
  font-weight: 700;
  font-size: var(--step--1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-to {
  font-size: var(--step--2);
  color: var(--muted);
}
.mail-time {
  grid-row: span 2;
  font-size: var(--step--2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mail-body {
  padding: 0.9rem 1rem 1.1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.mail-in {
  background: color-mix(in srgb, var(--paper) 60%, var(--white));
  margin-left: clamp(0rem, 6vw, 3rem);
}
.typing {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-m);
}
.typing::before {
  content: '';
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.composer {
  border-color: var(--brand);
}
.composer h2 {
  font-size: var(--step-1);
}

/* Viewing slots, grouped by day */
.slots {
  display: grid;
  gap: 0.9rem;
}
.slot-day {
  display: grid;
  gap: 0.4rem;
}
.slot-day h3 {
  font-size: var(--step--1);
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0;
  color: var(--muted);
}
.slot-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.slot-btn {
  min-width: 5.5rem;
  font-variant-numeric: tabular-nums;
}
.slot-btn.is-mine {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}
.slot-btn[disabled] {
  text-decoration: line-through;
}

/* ---------------------------------------------------------------- Phone (Missed-Call Catcher) */
.phone {
  width: min(100%, 21.5rem);
  margin-inline: auto;
  background: #0d1215;
  border-radius: 2.75rem;
  padding: 0.65rem;
  box-shadow:
    0 0 0 1.5px #2b343a inset,
    0 30px 60px -30px rgb(26 36 44 / 0.55);
}
.phone-screen {
  position: relative;
  background: #f6f7f8;
  border-radius: 2.2rem;
  min-height: 38rem;
  padding: 0.75rem 1rem 1.25rem;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.5rem;
  overflow: hidden;
}
.phone-screen > * + * {
  margin-top: 0;
}
.phone-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem 0;
  font-variant-numeric: tabular-nums;
}
.phone-bar .notch {
  width: 6.5rem;
  height: 1.6rem;
  border-radius: 1rem;
  background: #0d1215;
}
.phone-bar svg {
  display: inline;
}
.call-panel {
  text-align: center;
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  padding-top: 1.25rem;
  transition: padding var(--dur) var(--ease-out);
}
.call-label {
  font-size: var(--step--1);
  color: var(--muted);
  visibility: hidden;
}
.phone[data-state='ringing'] .call-label {
  visibility: visible;
}
.call-avatar {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}
.call-name {
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.2;
}
.call-number {
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.call-status {
  font-weight: 600;
  font-size: var(--step--1);
  min-height: 1.5em;
  margin-top: 0.2rem;
}
.phone[data-state='missed'] .call-status {
  color: var(--danger);
}
.call-btn.btn {
  margin-top: 0.75rem;
  flex-direction: column;
  gap: 0.35rem;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
}
.call-btn.btn:hover {
  background: none;
  transform: none;
}
.call-btn .dial {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2fb35b;
  color: #fff;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast);
}
.call-btn:hover .dial {
  transform: scale(1.05);
}
.call-btn:focus-visible {
  outline: none;
}
.call-btn:focus-visible .dial {
  outline: 3px solid var(--daffodil-deep);
  outline-offset: 3px;
}
.phone[data-state='ringing'] .call-btn .dial {
  background: #d93a2b;
  animation: ring 0.9s ease-in-out infinite;
}
.phone[data-state='missed'] .call-panel,
.phone:has([data-sms]) .call-panel {
  padding-top: 0.25rem;
}
.phone[data-state='missed'] .call-avatar,
.phone:has([data-sms]) .call-avatar {
  width: 3rem;
  height: 3rem;
  font-size: 1.05rem;
}
@keyframes ring {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-8deg);
  }
  75% {
    transform: rotate(8deg);
  }
}

.sms-thread {
  display: grid;
  gap: 0.5rem;
  align-content: end;
  min-height: 12rem;
  border-top: 1px solid #e2e5e8;
  padding-top: 0.75rem;
}
.sms-thread .sms-from {
  font-size: var(--step--2);
  color: var(--muted);
  text-align: center;
}
.sms-empty {
  align-self: center;
  text-align: center;
  font-size: var(--step--1);
  color: #5c666c;
  max-width: 15rem;
  margin-inline: auto;
}
.sms {
  justify-self: start;
  max-width: 88%;
  background: #e5e7ea;
  color: #111;
  padding: 0.55rem 0.8rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: sms-in 360ms var(--ease-out);
}
.sms a {
  color: #0a62d6;
}
.sms-time {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #6b747a;
}
@keyframes sms-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.phone-caption {
  text-align: center;
  margin-top: 0.75rem;
}

/* On a real phone, the visitor doesn't need a phone drawn inside their phone. */
@media (max-width: 40rem) {
  .is-business .phone {
    width: 100%;
    background: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .is-business .phone-screen {
    min-height: 0;
    border-radius: var(--radius-l);
    border: 1px solid var(--line);
    padding-top: 0.5rem;
  }
  .is-business .phone-bar {
    display: none;
  }
}

/* ---------------------------------------------------------------- Client Chaser */
.cc-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.desk-date {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.desk-cal {
  width: 3.6rem;
  border: 1.5px solid var(--slate);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  background: var(--white);
  flex: none;
}
.desk-cal span {
  display: block;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0;
}
.desk-cal strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.segmented {
  display: inline-flex;
  border: 1.5px solid var(--slate);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}
.segmented .btn {
  border: 0;
  border-radius: 0;
  min-height: 2.4rem;
}
.segmented .btn + .btn {
  border-left: 1.5px solid var(--slate);
}

/* Day 0 to 14 chasing timeline */
.chase-line {
  position: relative;
  height: 2.6rem;
  margin: 0.25rem 0.75rem 0;
}
.chase-line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0.55rem;
  height: 4px;
  border-radius: 2px;
  background: var(--paper-2);
}
.chase-progress {
  position: absolute;
  left: 0;
  top: 0.55rem;
  height: 4px;
  border-radius: 2px;
  background: var(--brand);
  transition: width var(--dur) var(--ease-out);
}
.chase-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  font-size: var(--step--2);
  color: var(--muted);
  white-space: nowrap;
}
.chase-mark::before {
  content: '';
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
}
.chase-mark.is-past::before {
  background: var(--brand);
  border-color: var(--brand);
}
.chase-mark.is-past {
  color: var(--slate);
  font-weight: 600;
}
.chase-today {
  position: absolute;
  top: -0.2rem;
  width: 2px;
  height: 1.5rem;
  background: var(--daffodil-deep);
  transform: translateX(-50%);
  transition: left var(--dur) var(--ease-out);
}

.docs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.doc {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}
.doc-owed {
  background: var(--white);
  border: 1.5px dashed #c9806f;
  color: var(--danger);
}
.doc-in {
  background: var(--moss-soft);
  color: var(--moss);
  border: 1.5px solid transparent;
}
.ladder {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.25rem;
}
.ladder i {
  width: 1.6rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--paper-2);
}
.ladder i.on {
  background: var(--brand);
}
.ladder i.on:nth-child(3) {
  background: #c27d00;
}
.ladder i.on:nth-child(4) {
  background: var(--danger);
}
.cc-table td:first-child {
  min-width: 10rem;
}
.cc-table tr[data-played] {
  background: color-mix(in srgb, var(--daffodil-soft) 70%, transparent);
}
.cc-table .chip-warn {
  margin-left: 0.4rem;
}
@media (max-width: 44rem) {
  .cc-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .cc-table,
  .cc-table tbody,
  .cc-table tr,
  .cc-table td {
    display: block;
  }
  .cc-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .cc-table td {
    border: 0;
    padding: 0;
  }
  .cc-table td:nth-child(2) {
    grid-column: 1 / -1;
  }
}
.play-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: end;
}
.play-form > .play-intro,
.play-form > .notice,
.play-form > .small {
  grid-column: 1 / -1;
}
@media (max-width: 48rem) {
  .play-form {
    grid-template-columns: 1fr;
  }
}

/* Client upload portal */
.portal {
  max-width: 36rem;
}
.ticks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.ticks li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-weight: 600;
}
.ticks li::before {
  content: '';
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  border: 2px solid var(--line);
  flex: none;
}
.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 1.5rem 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--brand) 4%, var(--white));
  cursor: pointer;
  font-size: var(--step-0);
  transition:
    border-color var(--dur-fast),
    background-color var(--dur-fast);
}
.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--white));
}
.dropzone input[type='file'] {
  max-width: 100%;
  font-size: var(--step--1);
  border: 0;
  background: none;
  padding: 0.25rem;
  text-align: center;
}
.dropzone input[type='file']::file-selector-button {
  font: inherit;
  font-weight: 700;
  margin-right: 0.6rem;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  border: 1.5px solid var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  cursor: pointer;
}
.sample-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}
.sample-list a {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step--1);
  transition: border-color var(--dur-fast);
}
.sample-list a:hover {
  border-color: var(--slate);
}
.sample-list a span {
  font-weight: 400;
  color: var(--muted);
  font-size: var(--step--2);
}
.done-badge {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--moss);
  color: #fff;
}

/* ---------------------------------------------------------------- Care view */
.health-card {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.health-card > * + * {
  margin-top: 0;
}
.health-card header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
}
.health-card h3 {
  font-size: var(--step-1);
}
.big-stat {
  font-size: var(--step-4);
  font-weight: 800;
  font-variation-settings: 'wdth' 112;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.health-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--danger-soft);
  overflow: hidden;
}
.health-bar span {
  display: block;
  height: 100%;
  background: var(--moss);
}
.conn-list {
  list-style: none;
  padding: 0;
  display: grid;
}
.conn-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line-soft);
}
.conn-list li:first-child {
  border-top: 0;
}
.alert-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.alert-item {
  display: grid;
  gap: 0.25rem;
}
.alert-item header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
}

dialog {
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-m);
  padding: 1rem;
  width: min(94vw, 64rem);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: rgb(26 36 44 / 0.7);
}
dialog video {
  border-radius: 6px;
  background: #000;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 60rem) {
  .presenter,
  .property,
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .runlog-panel,
  .enquiry-card {
    position: static;
  }
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cal {
    grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
  }
  .qr {
    width: 132px;
    height: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .phone[data-state='ringing'] .call-btn .dial {
    outline: 3px solid var(--daffodil);
    outline-offset: 3px;
  }
}
.board-card .chip {
  white-space: normal;
}
.chase-progress + .chase-mark {
  transform: translateX(-0.45rem);
  justify-items: start;
}
@media (max-width: 40rem) {
  .segmented {
    display: flex;
    width: 100%;
  }
  .segmented .btn {
    flex: 1;
  }
}
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}
