/* Workstead AI site. No external fonts or assets (strict CSP). */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #efede6;
  --text: #1c2321;
  --muted: #55605c;
  --line: #d9d6cc;
  --brand: #1f5f4a;
  --brand-ink: #ffffff;
  --brand-soft: #e3efe9;
  --accent: #b5562a;
  --warn-bg: #fff4e5;
  --warn-line: #c4661f;
  --danger-bg: #fdecea;
  --danger-line: #b3261e;
  --focus: #1f5fbf;
  --field-line: #8a877d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615; --surface: #1a201e; --surface-2: #222a27; --text: #e8ece9; --muted: #a5b0ab;
    --line: #34403b; --brand: #5fbf9a; --brand-ink: #0d1412; --brand-soft: #1f3029; --accent: #e08a5c;
    --warn-bg: #3a2a16; --warn-line: #e89a4f; --danger-bg: #3a1a18; --danger-line: #f08a80; --focus: #8ab4ff; --field-line: #6b7a74;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* component display rules must never override the hidden attribute */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); overflow-wrap: break-word; }
img { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 750; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; display: inline-flex; align-items: center; min-height: 44px; }
.logo span { color: var(--brand); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 650; box-shadow: inset 0 -2px 0 var(--brand); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

/* typography & sections */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.hero { padding: 56px 0 40px; }
.section { padding: 40px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand); margin: 0 0 8px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 60px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.checks { padding-left: 0; list-style: none; }
.checks li { padding-left: 28px; position: relative; margin: 6px 0; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 700; }
.not li::before { content: "–"; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--brand); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.band { background: var(--brand-soft); border-radius: var(--radius); padding: 28px; }
.notice { border-left: 4px solid var(--warn-line); background: var(--warn-bg); padding: 12px 16px; border-radius: 8px; }

/* forms */
label { font-weight: 600; display: block; margin: 14px 0 6px; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--field-line); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
textarea { resize: vertical; }
::placeholder { color: var(--muted); opacity: 1; }
.hint { color: var(--muted); font-size: .9rem; }

/* demo page */
.demo-banner { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); font-size: .95rem; }
.demo-banner .wrap { padding-top: 10px; padding-bottom: 10px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border: 1px solid var(--warn-line); color: var(--text); background: var(--warn-bg); padding: 2px 8px; border-radius: 999px; }
.tabs { display: none; gap: 8px; margin: 16px 0; }
.tabs button { flex: 1; min-height: 44px; border: 1px solid var(--field-line); background: var(--surface); color: var(--text); border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.demo-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); margin-top: 20px; align-items: start; }
@media (max-width: 899px) {
  .tabs { display: flex; }
  .demo-layout { grid-template-columns: 1fr; }
  .demo-layout > .is-hidden-mobile { display: none; }
}
.biz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.biz-head { padding: 16px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.biz-head h2 { font-size: 1.3rem; margin: 4px 0; }
.biz-facts { padding: 14px 18px; font-size: .95rem; border-bottom: 1px solid var(--line); }
.biz-facts details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

.chat { display: flex; flex-direction: column; height: min(70vh, 620px); min-height: min(420px, calc(100vh - 24px)); }
@supports (height: 1dvh) { .chat { height: min(70dvh, 620px); min-height: min(420px, calc(100dvh - 24px)); } }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.safety { align-self: stretch; max-width: none; background: var(--danger-bg); border: 2px solid var(--danger-line); }
.msg.notice { align-self: flex-start; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.msg .who { display: block; font-size: .75rem; font-weight: 700; opacity: .8; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .04em; }
.typing::after { content: "…"; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .typing::after { animation: none; } }
.status-line { padding: 6px 16px; font-size: .9rem; color: var(--muted); min-height: 1.6em; }
.status-line.error { color: var(--danger-line); font-weight: 600; }
.starters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 8px; }
.starters button { min-height: 44px; border: 1px solid var(--brand); color: var(--brand); background: transparent; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .92rem; cursor: pointer; }
.composer { border-top: 1px solid var(--line); padding: 12px 16px calc(12px + var(--kb, 0px)); background: var(--surface); position: sticky; bottom: 0; }
.retry-row { padding: 0 16px 8px; }
.retry-row:has(> [hidden]) { padding: 0; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 48px; max-height: 140px; }
.composer-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.linkbtn { background: none; border: none; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 4px; }

.owner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.owner h2 { font-size: 1.2rem; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--line); }
.pill[data-status="awaiting_staff_review"] { background: var(--brand-soft); border-color: var(--brand); }
.pill[data-status="safety_handoff"] { background: var(--danger-bg); border-color: var(--danger-line); }
.pill[data-status="not_serviceable"] { background: var(--warn-bg); border-color: var(--warn-line); }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0; font-size: .95rem; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 359px) { .fields { grid-template-columns: 1fr; } .fields dd { margin-bottom: 6px; } }
.fields dd.empty { font-weight: 400; color: var(--muted); font-style: italic; }
.fixed-line { font-size: .9rem; border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); }
.offline { padding: 16px; }
.example-head { font-size: 1rem; font-weight: 700; margin: 12px 0 8px; }
