/* ─────────────────────────────────────────────
   Clearlyst — projects.css
   Projects section + interactive demo window. Uses tokens from home.css.
───────────────────────────────────────────── */

/* ── Project cards ── */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proj {
  display: flex; flex-direction: column; gap: 12px;
  padding: 30px 28px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), opacity 0.9s var(--ease);
}
.proj:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.proj h3 { font-size: 25px; letter-spacing: -0.02em; }
.proj > p, .proj-wide-text > p { font-size: 16px; color: var(--muted); }
.proj-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.proj-client { font-size: 14px; font-weight: 600; color: var(--accent); }
.proj-badge { padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.proj-badge.soft { background: var(--tint); color: var(--muted); }
.proj-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-feats li { padding: 5px 11px; border-radius: 999px; background: var(--tint); font-size: 13px; color: var(--ink-2); }
.proj-open { align-self: flex-start; margin-top: auto; }

.proj-peek { margin: 4px 0 6px; padding: 16px; border-radius: 16px; background: var(--tint); display: grid; gap: 10px; }
.peek-crm div { display: grid; grid-template-columns: 78px 1fr 52px; align-items: center; gap: 10px; font-size: 13px; }
.peek-crm b { font-weight: 600; }
.peek-crm i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--w), #dcdce1 var(--w)); }
.peek-crm span { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.peek-chat p { max-width: 82%; padding: 8px 12px; border-radius: 15px; font-size: 13px; line-height: 1.35; }
.peek-chat .in { background: var(--surface); border-bottom-left-radius: 5px; }
.peek-chat .out { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }

.proj-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.proj-wide-text { display: flex; flex-direction: column; gap: 12px; }
.proj-flow { display: flex; align-items: center; gap: 10px; padding: 20px; border-radius: 18px; background: var(--dark); color: #f5f5f7; }
.flow-step { flex: 1; min-width: 0; display: grid; gap: 3px; justify-items: center; text-align: center; padding: 14px 8px; border-radius: 14px; background: var(--dark-surface); border: 1px solid var(--dark-line); }
.flow-step b { font-size: 14px; }
.flow-step small { font-size: 12px; color: #a1a1a6; }
.flow-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #0071e3, #64d2ff); font-size: 15px; margin-bottom: 4px; }
.flow-arrow { color: #6e6e73; font-size: 18px; flex: none; }

.proj-next { margin: 64px 0 22px; text-align: center; }
.proj-next .eyebrow { margin-bottom: 8px; }
.proj-next-title { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.025em; }

@media (max-width: 860px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-wide { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .proj { padding: 24px 20px; }
  .proj-flow { flex-direction: column; }
  .flow-step { width: 100%; }
  .flow-arrow { transform: rotate(90deg); }
}

/* ── Demo window ── */
html.demo-open { overflow: hidden; }
.demo {
  width: min(1120px, calc(100vw - 32px)); height: min(820px, calc(100dvh - 32px));
  max-width: none; max-height: none; padding: 0; border: 0;
  border-radius: 24px; background: var(--bg); color: var(--ink);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35); overflow: hidden;
}
.demo[open] { display: flex; flex-direction: column; animation: pop 0.35s var(--ease) both; }
.demo::backdrop { background: rgba(11, 11, 13, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.demo-bar { flex: none; display: flex; align-items: center; gap: 14px; padding: 14px 18px 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.demo-head { min-width: 0; flex: 1; }
.demo-client { font-size: 13px; font-weight: 600; color: var(--accent); }
.demo-bar h3 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-note { flex: none; padding: 5px 11px; border-radius: 999px; background: #fff4e0; color: #9a5b00; font-size: 12px; font-weight: 600; }
.demo-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--tint); cursor: pointer; }
.demo-close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.demo-body { flex: 1; min-height: 0; display: flex; }

/* App shell: side tabs + main */
.app { flex: 1; min-width: 0; display: grid; grid-template-columns: 200px 1fr; }
.app-nav { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--surface); }
.app-nav button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 11px; background: none; color: var(--ink-2); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.app-nav button:hover { background: var(--tint); }
.app-nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.app-nav .count { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--tint); font-size: 12px; color: var(--muted); }
.app-main { min-width: 0; overflow-y: auto; padding: 24px; }
.app-main.solo { flex: 1; }
.app-main h4 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.app-sub { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.app-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.kpi small { display: block; font-size: 12px; color: var(--muted); }
.kpi b { display: block; margin-top: 4px; font-size: 24px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi b.bump { animation: bump 0.6s var(--ease); }
@keyframes bump { 40% { color: var(--ok); transform: scale(1.08); } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-width: 0; }
.panel + .panel { margin-top: 14px; }
.panel-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.btn-ghost { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-ghost[disabled] { opacity: 0.45; cursor: default; background: var(--surface); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--tint); color: var(--muted); }
.pill.ok { background: #e3f6ee; color: #12805a; }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: #fff4e0; color: #9a5b00; }
.pill.red { background: #fde8ea; color: #c0102a; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 10px 8px; }
.tbl td { padding: 11px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--bg); }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 600; }
.who small { display: block; font-size: 12px; color: var(--muted); }
.ava { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.live.off::before { background: #c7c7cc; }

/* Bars */
.bars { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 10px; align-items: end; height: 140px; }
.bar { display: grid; gap: 6px; justify-items: center; height: 100%; align-content: end; font-size: 12px; color: var(--muted); }
.bar i { display: block; width: 100%; max-width: 38px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #2997ff, #0071e3); height: var(--h); min-height: 3px; transition: height 0.6s var(--ease); }
.bar span { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }

/* Schedule grid */
.sched { display: grid; grid-template-columns: 150px repeat(6, minmax(78px, 1fr)); gap: 6px; font-size: 13px; min-width: 640px; }
.sched .h { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 6px; }
.sched .w { display: flex; align-items: center; font-weight: 600; padding: 0 4px; }
.sched button { min-height: 44px; padding: 4px 6px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1.2; }
.sched button:hover { filter: brightness(0.96); border-color: rgba(0,0,0,0.08); }
.job-a { background: #e8f2fd; color: #0058b0; }
.job-b { background: #e3f6ee; color: #12805a; }
.job-c { background: #f3e9fd; color: #7a2fc2; }
.job-off { background: var(--tint); color: #a1a1a6; }

/* Jobs + photos */
.jobs { display: grid; gap: 14px; }
.job-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.job-head b { font-size: 16px; }
.job-head small { display: block; color: var(--muted); font-size: 13px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 12px 0; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--tint); }
.photo svg { width: 100%; height: 100%; }
.photo span { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; font-weight: 600; }
.photo.new { animation: pop 0.5s var(--ease) both; outline: 2px solid var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Invoice */
.inv-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 14px; align-items: start; }
.inv-doc { font-size: 14px; }
.inv-doc .line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.inv-doc .line span:first-child { color: var(--ink-2); }
.inv-doc .line span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.inv-doc .total { font-size: 18px; font-weight: 700; }
.inv-meta { display: grid; gap: 2px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.inv-meta b { color: var(--ink); font-size: 15px; }
.timeline { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.timeline span { flex: 1; min-width: 70px; padding: 7px 8px; border-radius: 10px; background: var(--tint); color: #a1a1a6; font-size: 12px; font-weight: 600; text-align: center; transition: background 0.4s, color 0.4s; }
.timeline span.done { background: #e3f6ee; color: #12805a; }

/* Lead engine: phone + dashboard */
.leads-app { flex: 1; min-width: 0; display: grid; grid-template-columns: 340px 1fr; }
.phone-col { display: flex; flex-direction: column; padding: 18px; border-right: 1px solid var(--line); background: var(--tint); min-height: 0; }
.phone { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 30px; background: var(--surface); border: 8px solid #1d1d1f; overflow: hidden; }
.phone-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.phone-top b { display: block; font-size: 14px; }
.phone-top small { display: block; font-size: 11px; color: var(--muted); }
.sms { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; }
.sms .b { max-width: 84%; padding: 9px 13px; border-radius: 17px; font-size: 14px; line-height: 1.4; animation: bubble 0.35s var(--ease) both; }
.sms .ai { align-self: flex-start; background: var(--tint); border-bottom-left-radius: 5px; }
.sms .lead { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.sms .sys { align-self: center; max-width: 94%; padding: 6px 10px; border-radius: 10px; background: #fff4e0; color: #9a5b00; font-size: 12px; font-weight: 600; text-align: center; }
.sms .ai small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.sms-empty { margin: auto; text-align: center; font-size: 14px; color: var(--muted); padding: 20px; }
.chips-reply { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line); min-height: 56px; align-items: center; }
.chips-reply button { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; animation: bubble 0.3s var(--ease) both; }
.chips-reply button:hover { background: var(--accent-soft); }
.chips-reply p { font-size: 12px; color: var(--muted); }
.phone-col .btn { margin-top: 14px; }

.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pipe-col { background: var(--tint); border-radius: 14px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 120px; min-width: 0; }
.pipe-col > p { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 2px 4px; }
.lead-card { padding: 9px 10px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; min-width: 0; }
.lead-card b { display: block; font-size: 13px; line-height: 1.25; }
.lead-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.lead-card.hot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pop 0.45s var(--ease) both; }

.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: #c9dffa; }
.legend i.q { background: #0071e3; }
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; }
.split { display: grid; gap: 10px; }
.split div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.split i { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--c, var(--accent)) var(--w), var(--tint) var(--w)); }
.split b { font-variant-numeric: tabular-nums; }

.toast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); animation: toast-in 0.4s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.demo-body { position: relative; }

/* Restaurant */
.staff-list { display: grid; gap: 8px; }
.staff { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.staff .who { flex: 1; }
.staff.swap { border-color: var(--ok); background: #f1fbf6; animation: pop 0.45s var(--ease) both; }
.staff.out { opacity: 0.55; text-decoration: line-through; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.log { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; }
.log .b { max-width: 92%; padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; animation: bubble 0.35s var(--ease) both; }
/* The log re-renders on every step: only the newest message animates in. */
.log .b:not(:last-child) { animation: none; }
.log .ai { justify-self: start; background: var(--accent-soft); color: #0b3d75; }
.log .them { justify-self: end; background: var(--tint); }
.log .sys { justify-self: center; background: #fff4e0; color: #9a5b00; font-size: 12px; font-weight: 600; }
.two > * { min-width: 0; }
.brain { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--dark); color: #f5f5f7; font-size: 12px; font-weight: 600; }
.brain i { width: 8px; height: 8px; border-radius: 50%; background: #64d2ff; box-shadow: 0 0 0 0 rgba(100,210,255,.6); animation: ping 2s infinite; }

/* Demo on tablets and phones */
@media (max-width: 900px) {
  .demo { width: 100vw; height: 100dvh; border-radius: 0; }
  /* Full screen on phones: keep the bar below the Dynamic Island and content above the home bar. */
  .demo-bar { padding-top: max(10px, env(safe-area-inset-top)); }
  .demo-body { padding-bottom: env(safe-area-inset-bottom); }
  /* The demo body scrolls on phones, so pin the toast to the screen. */
  .toast { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .demo-body { overflow-y: auto; }
  .app { display: block; }
  .app-nav { position: sticky; top: 0; z-index: 2; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; scrollbar-width: none; }
  .app-nav button { flex: none; }
  .app-main { overflow: visible; padding: 18px 16px 28px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .inv-grid, .two, .dash-grid { grid-template-columns: 1fr; }
  .leads-app { display: block; }
  .phone-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .phone { height: 440px; flex: none; }
  .pipe { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .demo-bar { padding: 10px 10px 10px 16px; gap: 8px; }
  .demo-note { display: none; }
  .demo-bar h3 { font-size: 16px; }
  .kpis.three { grid-template-columns: 1fr 1fr; }
  .tbl .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo[open] { animation: none; }
}
.legend .job-a, .legend .job-b, .legend .job-c { background: currentColor; }

/* ── Floating AI assistant inside each demo ── */
.copilot { position: absolute; right: 18px; bottom: 18px; z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.copilot > * { pointer-events: auto; }
.cp-fab { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #0071e3, #7d7aff); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 113, 227, 0.35); animation: cp-in 0.5s var(--ease) 0.4s both, glow 2.6s ease-in-out 1s infinite; }
.cp-fab:hover { transform: translateY(-1px); }
@keyframes cp-in { from { opacity: 0; transform: translateY(12px) scale(0.9); } }
.cp-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); font-size: 15px; flex: none; }
.cp-hint { max-width: 220px; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: var(--ink); color: #fff; font-size: 13px; box-shadow: var(--shadow); animation: cp-in 0.5s var(--ease) 1.1s both; }
.cp-panel { width: 360px; height: min(480px, calc(100dvh - 200px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop 0.3s var(--ease) both; }
.cp-panel[hidden] { display: none; }
.cp-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: linear-gradient(135deg, #0071e3, #7d7aff); color: #fff; }
.cp-head > div { flex: 1; min-width: 0; }
.cp-head b { display: block; font-size: 15px; }
.cp-head small { display: block; font-size: 11px; opacity: 0.85; }
.cp-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); cursor: pointer; flex: none; }
.cp-x svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.cp-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.cp-log .b { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; animation: bubble 0.3s var(--ease) both; }
.cp-log .bot { align-self: flex-start; background: var(--tint); border-bottom-left-radius: 5px; }
.cp-log .me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.cp-chips { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.cp-chips::-webkit-scrollbar { display: none; }
.cp-chips button { flex: none; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.cp-chips button:hover { background: var(--accent-soft); }
.cp-form { flex: none; display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.cp-form input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 21px; background: var(--tint); font: inherit; font-size: 16px; color: var(--ink); }
.cp-form input:focus { outline: 0; border-color: var(--accent); background: var(--surface); }
.cp-form button { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; flex: none; }
.cp-form button svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* "Built-in AI" callout in the Projects section */
.ai-callout { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; max-width: 860px; margin: 0 auto 28px; padding: 20px 24px; border-radius: 22px; background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(125, 122, 255, 0.10)); border: 1px solid #d6e6fb; }
.ai-callout .cp-mark { width: 46px; height: 46px; font-size: 20px; color: #fff; background: linear-gradient(135deg, #0071e3, #7d7aff); }
.ai-callout b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.ai-callout p { margin-top: 4px; font-size: 15px; color: var(--ink-2); }
.proj-feats li.ai-feat { background: linear-gradient(135deg, #0071e3, #7d7aff); color: #fff; font-weight: 600; }

@media (max-width: 900px) {
  /* The demo body scrolls on phones: pin the assistant to the screen, above the home bar. */
  .copilot { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); left: 14px; }
  .cp-panel { width: 100%; height: min(560px, calc(100dvh - 120px - env(safe-area-inset-top))); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .ai-callout { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
}
/* Client logo next to the name on project cards */
.proj-client { display: inline-flex; align-items: center; gap: 9px; }
.plogo { flex: none; width: 28px; height: 28px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
