:root {
  color-scheme: light;
  --ink: #10251d;
  --ink-soft: #486158;
  --paper: #f4f1e9;
  --card: #fffdf7;
  --line: rgba(16, 37, 29, 0.12);
  --mint: #baf5c8;
  --mint-deep: #42c66d;
  --sun: #ffcf70;
  --red: #d85945;
  --shadow: 0 24px 70px rgba(31, 53, 43, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 2%, rgba(186, 245, 200, 0.6), transparent 30rem),
    radial-gradient(circle at 95% 30%, rgba(255, 207, 112, 0.25), transparent 28rem),
    var(--paper);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: 0.035; z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar {
  max-width: 1180px; margin: 0 auto; padding: 28px 28px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ink); color: var(--mint); font-size: 13px; font-weight: 800; letter-spacing: .06em;
  box-shadow: 0 8px 20px rgba(16, 37, 29, .18);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--ink-soft); font-size: 12px; }
.live-pill {
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.48);
  color: var(--ink-soft); font-size: 12px; font-weight: 650; backdrop-filter: blur(10px);
}
.live-pill span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--mint-deep); box-shadow: 0 0 0 4px rgba(66,198,109,.14); }

.shell {
  max-width: 1180px; min-height: 730px; margin: 0 auto; padding: 62px 28px 86px;
  display: grid; grid-template-columns: 1fr minmax(350px, 450px); gap: 8vw; align-items: center;
}
.eyebrow { margin: 0 0 18px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #588069; }
.intro h1 { margin: 0; max-width: 700px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 6.4vw, 82px); line-height: .96; letter-spacing: -.055em; font-weight: 500; }
.intro h1 em { color: #2e7e50; font-weight: 500; }
.lede { max-width: 560px; margin: 28px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.proof-row { display: flex; gap: 34px; margin-top: 38px; }
.proof-row div { min-width: 82px; }
.proof-row strong, .proof-row span { display: block; }
.proof-row strong { font-size: 19px; }
.proof-row span { margin-top: 4px; color: var(--ink-soft); font-size: 12px; }
.service-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; min-height: 35px; }
.service-chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.46); font-size: 12px; color: var(--ink-soft); }

.device {
  position: relative; height: 650px; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(16,37,29,.15); border-radius: 34px; background: var(--card); box-shadow: var(--shadow);
}
.device::before { content: ""; position: absolute; inset: 0 0 auto; height: 120px; background: linear-gradient(180deg, rgba(186,245,200,.42), transparent); pointer-events: none; }
.device-bar { position: relative; display: flex; align-items: center; gap: 11px; padding: 20px; border-bottom: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--mint); font-family: Georgia, serif; font-size: 18px; }
.device-bar strong, .device-bar span { display: block; }
.device-bar strong { font-size: 14px; }
.device-bar span { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.device-bar i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--mint-deep); }
.icon-button { margin-left: auto; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.56); color: var(--ink-soft); font-size: 17px; }
.messages { flex: 1; padding: 20px; overflow-y: auto; scroll-behavior: smooth; }
.message { display: flex; margin: 9px 0; }
.message > div { max-width: 82%; padding: 11px 14px; border-radius: 17px; font-size: 13.5px; line-height: 1.52; white-space: pre-wrap; box-shadow: 0 3px 12px rgba(16,37,29,.04); }
.message.customer { justify-content: flex-end; }
.message.customer > div { border-bottom-right-radius: 5px; background: var(--ink); color: #f8fff9; }
.message.ai > div, .message.owner > div { border: 1px solid var(--line); border-bottom-left-radius: 5px; background: #fff; }
.message.owner > div { background: #fff3d8; border-color: rgba(194,132,31,.2); }
.message time { display: block; margin-top: 5px; opacity: .52; font-size: 9px; }
.typing { margin: 0 20px 6px; width: 52px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.typing span { display: inline-block; width: 5px; height: 5px; margin: 0 1px; border-radius: 50%; background: #7f928a; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .28; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.quick-actions { display: flex; gap: 7px; padding: 3px 16px 10px; overflow-x: auto; }
.quick-actions button { white-space: nowrap; border: 1px solid rgba(46,126,80,.22); border-radius: 999px; padding: 7px 10px; background: #f1fbf3; color: #2e6947; font-size: 11px; }
.composer { display: flex; gap: 9px; align-items: flex-end; margin: 0 14px; padding: 9px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 5px 22px rgba(16,37,29,.07); }
.composer textarea { flex: 1; max-height: 110px; resize: none; border: 0; outline: 0; padding: 8px; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.4; }
.composer button { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 13px; background: var(--ink); color: var(--mint); font-size: 20px; transition: transform .2s; }
.composer button:hover { transform: translateY(-2px); }
.composer button:disabled { opacity: .5; transform: none; }
.privacy-note { margin: 9px 18px 14px; text-align: center; color: #85938d; font-size: 9px; }

.owner-section { max-width: 1180px; margin: 0 auto 80px; padding: 64px 28px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 4vw, 52px); font-weight: 500; letter-spacing: -.04em; }
.owner-auth { display: flex; gap: 8px; }
.owner-auth input { width: 240px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: rgba(255,255,255,.58); outline: none; }
.owner-auth button { border: 0; border-radius: 12px; padding: 11px 15px; background: var(--ink); color: #fff; font-weight: 700; font-size: 12px; }
.locked-card { margin-top: 28px; min-height: 160px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed rgba(16,37,29,.2); border-radius: 22px; color: var(--ink-soft); background: rgba(255,255,255,.25); text-align: center; }
.locked-card span { font-size: 24px; }
.locked-card p { margin: 0; max-width: 390px; font-size: 13px; }
.dashboard { margin-top: 28px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.52); }
.stat-grid span, .stat-grid strong { display: block; }
.stat-grid span { color: var(--ink-soft); font-size: 11px; }
.stat-grid strong { margin-top: 8px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.workspace-tabs { display: flex; gap: 7px; margin-top: 18px; padding: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.42); }
.workspace-tabs button { border: 0; border-radius: 10px; padding: 9px 13px; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.workspace-tabs button.active { background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(16,37,29,.14); }
.workspace-panel { display: grid; gap: 14px; margin-top: 14px; }
.panel { min-height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.62); }
.panel-title { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.panel-title h3 { margin: 0; font-size: 14px; }
.panel-title span { color: var(--ink-soft); font-size: 10px; }
.panel-title p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; }
.conversation, .booking { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.conversation:last-child, .booking:last-child { border: 0; }
.conversation-head, .booking-head { display: flex; justify-content: space-between; gap: 12px; }
.conversation strong, .booking strong { font-size: 12px; }
.conversation time, .booking time { color: var(--ink-soft); font-size: 9px; }
.conversation p, .booking p { margin: 6px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.badge { display: inline-block; margin-top: 7px; padding: 4px 7px; border-radius: 999px; background: #e8f7eb; color: #2e6947; font-size: 9px; font-weight: 700; }
.badge.human { background: #fff1d3; color: #8a5d14; }
.empty { padding: 30px; color: var(--ink-soft); text-align: center; font-size: 12px; }
.form-panel { min-height: 0; overflow: visible; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-panel label, .stack-form label, .record-row label, .candidate-card label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.form-panel input, .form-panel textarea, .form-panel select, .stack-form input, .stack-form textarea, .record-row input, .record-row textarea, .record-row select, .candidate-card textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; outline: none; background: rgba(255,255,255,.76); color: var(--ink); font-size: 12px; line-height: 1.45;
}
.form-panel input:focus, .form-panel textarea:focus, .form-panel select:focus, .stack-form input:focus, .stack-form textarea:focus, .record-row input:focus, .record-row textarea:focus, .candidate-card textarea:focus { border-color: rgba(46,126,80,.55); box-shadow: 0 0 0 3px rgba(66,198,109,.1); }
.primary-action, .secondary-action { border: 0; border-radius: 10px; padding: 9px 13px; font-size: 11px; font-weight: 750; }
.primary-action { background: var(--ink); color: #fff; }
.secondary-action { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.working-hours { display: grid; gap: 0; padding: 4px 18px 14px; }
.hours-row { display: grid; grid-template-columns: 110px 80px 1fr 20px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border: 0; }
.hours-row strong { font-size: 11px; }
.hours-row label { display: flex; align-items: center; gap: 6px; }
.hours-row input[type="checkbox"] { width: auto; }
.hours-row span { color: var(--ink-soft); text-align: center; font-size: 10px; }
.record-editor { display: grid; gap: 10px; padding: 14px; }
.record-row { display: grid; grid-template-columns: 1.1fr 2fr .65fr .75fr .55fr .6fr; gap: 9px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.5); }
.record-row.knowledge-row { grid-template-columns: 1fr 2.4fr .65fr; }
.record-row.specialist-row { grid-template-columns: minmax(220px, 1fr) 100px; }
.record-row textarea { min-height: 64px; resize: vertical; }
.inline-check { display: flex !important; grid-auto-flow: column; justify-content: start; align-items: center; padding-bottom: 10px; }
.inline-check input { width: auto; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid rgba(16,37,29,.16); border-radius: 15px; background: rgba(255,253,247,.94); box-shadow: 0 12px 32px rgba(16,37,29,.12); backdrop-filter: blur(12px); }
.sticky-actions span { color: var(--ink-soft); font-size: 10px; }
.ingestion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack-form { display: grid; gap: 13px; padding: 18px; }
.stack-form textarea { resize: vertical; }
.ingestion-runs { max-height: 480px; overflow-y: auto; }
.ingestion-run { display: grid; gap: 6px; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; color: var(--ink); }
.ingestion-run:hover { background: rgba(186,245,200,.18); }
.ingestion-run strong { font-size: 12px; }
.ingestion-run small { color: var(--ink-soft); font-size: 10px; }
.run-meta { display: flex; gap: 7px; align-items: center; }
.review-panel { min-height: 0; }
.candidate-list { display: grid; gap: 10px; padding: 14px; }
.candidate-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.56); }
.candidate-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.candidate-head strong { font-size: 12px; }
.candidate-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; }
.candidate-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px; }
.candidate-values pre { min-height: 90px; max-height: 210px; overflow: auto; margin: 0; padding: 10px; border-radius: 10px; background: rgba(16,37,29,.055); white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.candidate-card textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.evidence { margin: 10px 0 0; padding-left: 10px; border-left: 3px solid var(--mint-deep); color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.evidence.invalid { border-color: var(--red); }
.decision-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 11px; }
.decision-row div { display: flex; gap: 6px; }
.decision-row button { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 700; }
.decision-row button.approve.selected { border-color: #42a961; background: #e8f7eb; color: #276a3d; }
.decision-row button.reject.selected { border-color: #d58173; background: #fff0ed; color: #9b3e2f; }
.status-processing { background: #edf3ff; color: #385e99; }
.status-review { background: #fff1d3; color: #8a5d14; }
.status-published { background: #e8f7eb; color: #2e6947; }
.status-queued { background: #f0eef8; color: #635184; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; transform: translateY(20px); opacity: 0; pointer-events: none; padding: 12px 15px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 12px; box-shadow: var(--shadow); transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding-top: 40px; gap: 54px; }
  .intro { text-align: center; }
  .intro h1, .lede { margin-left: auto; margin-right: auto; }
  .proof-row, .service-list { justify-content: center; }
  .device { width: min(100%, 460px); margin: 0 auto; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .record-row { grid-template-columns: 1fr 1fr; }
  .record-row.knowledge-row { grid-template-columns: 1fr; }
  .record-row.specialist-row { grid-template-columns: 1fr 100px; }
  .ingestion-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .topbar { padding: 18px 16px 0; }
  .live-pill { display: none; }
  .shell { padding: 46px 12px 60px; }
  .intro { padding: 0 10px; }
  .intro h1 { font-size: 48px; }
  .lede { font-size: 15px; }
  .proof-row { gap: 18px; }
  .device { height: 680px; border-radius: 25px; }
  .owner-section { padding: 48px 16px; }
  .owner-auth { flex-direction: column; }
  .owner-auth input { width: 100%; }
  .stat-grid { gap: 7px; }
  .stat-grid article { padding: 13px; }
  .stat-grid strong { font-size: 24px; }
  .workspace-tabs { width: 100%; overflow-x: auto; }
  .workspace-tabs button { flex: 1; white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .hours-row { grid-template-columns: 80px 1fr 18px 1fr; }
  .hours-row > label { grid-column: 2 / -1; }
  .hours-row > input[type="time"] { min-width: 0; }
  .record-row.specialist-row { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 1fr; }
  .sticky-actions { align-items: stretch; flex-direction: column; }
  .candidate-values { grid-template-columns: 1fr; }
}
