/* Shiftr brand tokens, shared with shiftr.today */
:root {
  --blue: #2442ff;
  --blue-deep: #1a30c9;
  --blue-wash: #a9d4ff;
  --home-fill: #e4f0ff;
  --ink: #121518;
  --ink-soft: #46515c;
  --dim: #5f6b76;
  --paper: #f7f8f7;
  --paper-tint: #edf0f1;
  --rule: #d4dbe1;
  --red: #c8261b;
  --green: #1d7a46;
  --amber: #a15c00;
  --display: 'Archivo', 'Arial Narrow', sans-serif;
  --body: 'Hind', system-ui, sans-serif;
}

* { box-sizing: border-box; }
/* Elements with display rules (e.g. .typing) must still disappear when hidden. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--body);
}
h1, h2, h3 { font-family: var(--display); font-stretch: 85%; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; }
a { color: var(--blue); }
.dim { color: var(--dim); }
.small { font-size: .875rem; }

/* layout */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1.25rem; background: #fff; border-bottom: 1px solid var(--rule);
}
.brand { font-family: var(--display); font-weight: 800; font-stretch: 80%; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--blue); }
.topbar nav { display: flex; align-items: center; gap: 1rem; font-size: .95rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.narrow { max-width: 440px; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* surfaces */
.card { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.stat { font-family: var(--display); font-stretch: 85%; font-weight: 800; font-size: 2rem; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stats .label { font-size: .8rem; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; margin-top: .35rem; }

/* forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: .9rem 0 .3rem; }
input, select {
  width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid var(--grid, #c3ccd4);
  border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 1rem var(--body); padding: .7rem 1.1rem; border-radius: 8px; border: 1px solid var(--blue);
  background: var(--blue); color: #fff; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--blue-deep); }
.btn.secondary { background: #fff; color: var(--blue); }
.btn.secondary:hover { background: var(--home-fill); }
.btn.link { background: none; border: 0; color: var(--dim); padding: .25rem; font-weight: 400; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
.error { background: #fdecea; color: var(--red); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0; }
.notice { background: var(--home-fill); border-radius: 8px; padding: .75rem 1rem; margin: .75rem 0; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--dim);
  font-weight: 600; border-bottom: 1px solid var(--rule); padding: .5rem; }
td { border-bottom: 1px solid var(--paper-tint); padding: .55rem .5rem; vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--paper); }
.table-scroll { overflow-x: auto; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; background: var(--paper-tint); }

/* status pills */
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px;
  background: var(--paper-tint); color: var(--ink-soft); white-space: nowrap; }
.pill.ready { background: #e3f4ea; color: var(--green); }
.pill.processing { background: var(--home-fill); color: var(--blue-deep); }
.pill.needs_minutes, .pill.failed { background: #fdecea; color: var(--red); }
.pill.customer { background: #fff4e0; color: var(--amber); }

.copy { display: flex; gap: .5rem; }
.copy input { font-size: .9rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .35rem 0; border-bottom: 1px solid var(--paper-tint); }

/* customer capture (phone first) */
.capture { max-width: 520px; margin: 0 auto; padding: 1.25rem 1rem 6rem; }
.capture .from { font-size: .9rem; color: var(--dim); margin-bottom: .25rem; }
.steps { padding-left: 1.2rem; margin: .5rem 0 1rem; }
.steps li { margin: .3rem 0; }
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.room-btn { font: 600 .95rem var(--body); padding: .9rem .6rem; border-radius: 10px; border: 1px solid var(--rule);
  background: #fff; color: var(--ink); cursor: pointer; text-align: left; position: relative; }
.room-btn:hover { border-color: var(--blue); }
.room-btn.done { border-color: var(--green); background: #f1faf4; }
.room-btn .count { display: block; font-weight: 400; font-size: .8rem; color: var(--dim); }
.progress { height: 6px; background: var(--paper-tint); border-radius: 3px; overflow: hidden; margin-top: .4rem; }
.progress > div { height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.clip-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 0;
  border-bottom: 1px solid var(--paper-tint); }
.sticky-submit { position: fixed; left: 0; right: 0; bottom: 0; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--rule); }
.sticky-submit .btn { max-width: 520px; margin: 0 auto; display: flex; }
/* customer interview chat */
.chat { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0 .6rem; }
.bubble { max-width: 85%; padding: .65rem .9rem; border-radius: 14px; line-height: 1.4; white-space: pre-line; }
.bubble.bot { align-self: flex-start; background: #fff; border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.typing { color: var(--dim); display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.options { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.options button { font: 600 .95rem var(--body); padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--blue);
  background: #fff; color: var(--blue); cursor: pointer; }
.options button:hover { background: var(--home-fill); }
.answer-row { display: flex; gap: .5rem; }
.answer-row input { flex: 1; }
.transcript .bubble { max-width: 75%; font-size: .95rem; }

.powered { text-align: center; font-size: .8rem; color: var(--dim); margin-top: 2rem; }

@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .hide-sm { display: none; }
}
