/* Lead alert: warm greige ops room, one vermilion signal, one calm slate-blue. Figtree + Instrument Serif. */
:root {
  --ground: #ECE6DE;
  --card: #FBF8F3;
  --ink: #2A2320;
  --ink-2: #584D46;
  --line: #D2C8BB;
  --signal: #C3301A;      /* 5.4:1 on white */
  --signal-bg: #FBE3DD;
  --calm: #2F4A63;        /* 9:1 on white */
  --calm-dark: #223649;
  --calm-tint: #DAE4EC;
  --green: #22643D; --green-bg: #DFF0E5;
  --phone: #1A2028; --screen: #242D38; --screen-2: #2E3844;
  --r: 14px;
  --shadow: 0 1px 0 rgba(42,35,32,.05), 0 10px 24px -14px rgba(42,35,32,.35);
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 1rem/1.55 var(--sans); overflow-wrap: break-word; }
h1, h2, h3, p, ul, fieldset { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--calm); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.banner { background: var(--ink); color: #F1EAE1; }
.banner p { max-width: 1360px; margin: 0 auto; padding: 10px var(--gutter); font-size: .9375rem; }
.banner b { color: #fff; }

.hero { padding: clamp(24px, 4vw, 44px) 0 clamp(20px, 3vw, 32px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.0625rem; margin-bottom: 18px; }
.brand .ico { color: var(--signal); }
.brand span { font-weight: 500; color: var(--ink-2); }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.7rem, 6.2vw, 5.25rem); line-height: .98; letter-spacing: -.02em; max-width: 21ch; margin-bottom: 20px; }
h1 em { color: var(--calm); }
.lede { max-width: 58ch; font-size: 1.1875rem; color: var(--ink-2); }

/* zones */
.zones { display: grid; grid-template-columns: minmax(0, 1fr) 388px minmax(0, 1fr); gap: 32px; align-items: start; }
.zone { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.zone > h2, .log-sec > h2 { display: flex; align-items: baseline; gap: 12px; font-size: 1.375rem; font-weight: 800; letter-spacing: -.01em; }
.step { font-family: var(--serif); font-weight: 400; font-size: 3rem; line-height: .8; color: var(--signal); }

.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 2px solid transparent; border-radius: 10px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn.primary { background: var(--calm); color: #fff; }
.btn.primary:hover { background: var(--calm-dark); }
.btn.ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.small { min-height: 44px; padding: 6px 14px; font-size: .9375rem; }
.btn.quiet { background: var(--card); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--ink); }

/* zone A */
.examples { display: grid; gap: 8px; }
.ex-k { font-size: .8125rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.ex-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ex { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; background: var(--calm-tint); color: var(--calm-dark); border: 2px solid transparent; border-radius: 10px; font-weight: 700; cursor: pointer; }
.ex:hover { border-color: var(--calm); }
.form { padding: 22px; display: grid; gap: 16px; }
.form h3 { font-size: 1.25rem; font-weight: 800; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; }
.field label, .field legend { font-weight: 700; font-size: .9375rem; padding: 0; }
.opt { font-weight: 400; color: var(--ink-2); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea { width: 100%; min-height: 48px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--calm); outline: none; box-shadow: 0 0 0 3px var(--calm-tint); }
.field [aria-invalid="true"] { border-color: var(--signal); }
.err { color: var(--signal); font-weight: 700; font-size: .9375rem; }
.err:empty { display: none; }
.form-err { color: var(--signal); font-weight: 800; }
.form-err:empty { display: none; }
.u-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.u-opt { position: relative; display: block; }
.u-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.u-opt label { display: grid; justify-items: start; gap: 0; min-height: 76px; padding: 10px 10px 8px; border: 2px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; }
.u-opt label b { font-size: .9375rem; }
.u-opt label small { color: var(--ink-2); font-size: .8125rem; }
.u-opt .ico { color: var(--ink-2); margin-bottom: 4px; }
.u-opt input:checked + label { border-color: var(--calm); background: var(--calm-tint); box-shadow: inset 0 0 0 1px var(--calm); }
.u-opt input:checked + label .ico { color: var(--calm-dark); }
.u-opt:first-child input:checked + label { border-color: var(--signal); background: var(--signal-bg); box-shadow: inset 0 0 0 1px var(--signal); }
.u-opt:first-child input:checked + label .ico { color: var(--signal); }
.u-opt input:focus-visible + label { outline: 3px solid var(--calm); outline-offset: 2px; }

/* zone B: phone */
.phone { background: var(--phone); border-radius: 44px; padding: 12px; box-shadow: 0 24px 44px -20px rgba(26,32,40,.65); position: relative; }
.ph-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 96px; height: 24px; background: #0E1217; border-radius: 14px; z-index: 2; }
.ph-screen { background: var(--screen); border-radius: 34px; padding: 22px 12px 16px; color: #F2ECE4; min-height: 560px; }
.ph-time { font-size: 3.25rem; font-weight: 300; text-align: center; line-height: 1; letter-spacing: -.02em; padding-top: 26px; font-variant-numeric: tabular-nums; }
.ph-date { text-align: center; color: #C9C0B5; font-size: .875rem; margin: 4px 0 16px; }
.stack { display: grid; gap: 14px; }
.stack-empty { display: grid; justify-items: center; gap: 8px; text-align: center; color: #D7CFC4; padding: 36px 20px; border: 1.5px dashed #56606C; border-radius: 16px; }
.stack-empty .ico { width: 28px; height: 28px; }
.stack-more { text-align: center; font-size: .875rem; color: #C9C0B5; }
.alert-group { display: grid; gap: 6px; }
.ag-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 4px; }
.ag-name { font-weight: 800; }
.alert-card { background: #F6F1EA; color: var(--ink); border-radius: 16px; padding: 10px 12px 11px; display: grid; gap: 2px; }
.alert-group.is-urgent .alert-card { box-shadow: inset 5px 0 0 var(--signal); }
.alert-group.is-done { opacity: .78; }
.ac-meta { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--ink-2); font-weight: 600; }
.ac-meta .ico { width: 1em; height: 1em; }
.ac-meta time { margin-left: auto; font-variant-numeric: tabular-nums; text-align: right; }
.ac-title { font-weight: 800; font-size: .9375rem; line-height: 1.3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ac-body { font-size: .9375rem; line-height: 1.4; color: var(--ink); }
.ac-body a { color: var(--calm-dark); font-weight: 800; text-underline-offset: 3px; }
.ac-body q { quotes: "\201C" "\201D"; }
.bot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--calm); color: #fff; font-size: .625rem; font-weight: 800; }
.tag-urgent { display: inline-flex; align-items: center; gap: 4px; background: var(--signal); color: #fff; font-weight: 800; font-size: .75rem; letter-spacing: .08em; padding: 2px 8px 2px 6px; border-radius: 6px; vertical-align: middle; }
.ac-body .tag-urgent { margin-right: 6px; }
.tag-urgent .ico { width: 1.1em; height: 1.1em; stroke-width: 2.2; }
.tag-when, .tag-done { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--screen-2); color: #E7DFD4; }
.tag-done { background: var(--green-bg); color: var(--green); }
.tag-done .ico { width: 1em; height: 1em; }
.ag-actions { display: flex; gap: 8px; }
.ag-actions .btn { flex: 1; background: var(--screen-2); color: #F6F1EA; border-color: #4A5664; }
.ag-actions .btn:hover { border-color: #F6F1EA; }
.ag-actions .textb { background: #F6F1EA; color: var(--ink); border-color: #F6F1EA; }
.ag-note { font-size: .875rem; color: #E7DFD4; padding: 0 4px; }
.tb { display: grid; gap: 8px; background: var(--screen-2); border-radius: 14px; padding: 12px; }
.tb label { font-size: .875rem; font-weight: 700; color: #E7DFD4; }
.tb textarea { width: 100%; border: 2px solid #4A5664; border-radius: 10px; background: #F6F1EA; color: var(--ink); padding: 8px 10px; resize: vertical; font-size: .9375rem; }
.alert-group.enter .alert-card { animation: slide-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.alert-group.enter .ac-mail { animation-delay: .35s; }
.alert-group.enter .ac-chat { animation-delay: .7s; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-16px) scale(.98); } to { opacity: 1; transform: none; } }

/* zone C */
.ah-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 700; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; margin: 0; border-radius: 15px; background: #8E8378; position: relative; cursor: pointer; transition: background-color .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--calm); }
.switch input:checked::after { transform: translateX(22px); }
.ah-note { color: var(--ink-2); font-size: .9375rem; }
.cust { display: grid; gap: 16px; }
.cust-k { display: flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.sms-thread { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.sms-from { font-size: .8125rem; color: var(--ink-2); margin-bottom: 8px; }
.sms-bubble { background: var(--calm-tint); color: var(--calm-dark); border-radius: 6px 20px 20px 20px; padding: 12px 16px; font-size: 1.0625rem; line-height: 1.45; }
.placeholder { color: var(--ink-2); font-style: italic; font-size: .9375rem; }
.mail { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; font-size: .9375rem; }
.mail-h { border-bottom: 1px solid var(--line); padding: 4px 0 8px; margin-bottom: 8px; }
.mail-h span { display: inline-block; min-width: 4.5em; color: var(--ink-2); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.mail-body p + p { margin-top: 10px; }
.mail-quote { color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 10px; }
.mail-sig { color: var(--ink-2); }

/* log */
.log-sec { margin-top: clamp(36px, 6vw, 64px); padding-bottom: 56px; display: grid; gap: 14px; }
.log-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.avg { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.log-note { font-size: .9375rem; color: var(--ink-2); }
.log-empty { padding: 24px; border: 1.5px dashed var(--line); border-radius: var(--r); color: var(--ink-2); }
.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.grid th { text-align: left; font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 12px 14px; background: #F3EDE5; border-bottom: 1px solid var(--line); }
.grid td { padding: 10px 14px; border-bottom: 1px solid #E5DDD2; vertical-align: middle; }
.row:last-child td { border-bottom: 0; }
.row td:first-child { border-left: 6px solid var(--line); font-variant-numeric: tabular-nums; }
.row.urgent td:first-child { border-left-color: var(--signal); }
.c-name { font-weight: 700; }
.urg { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.urg.u-emergency { color: var(--signal); font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 8px; font-weight: 800; font-size: .9375rem; white-space: nowrap; }
.chip-new { background: var(--calm-tint); color: var(--calm-dark); }
.chip-called { background: var(--green-bg); color: var(--green); }
.resp { margin-left: 8px; font-size: .9375rem; color: var(--ink-2); white-space: nowrap; }
.c-act { text-align: right; }

.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--ink-2); font-size: .9375rem; }
.foot p { max-width: 74ch; }

@media (max-width: 1199px) {
  .zones { grid-template-columns: minmax(0, 1fr) 388px; }
  .zone-c { grid-column: 1 / -1; }
  .cust { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 860px) {
  .zones { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cust { grid-template-columns: 1fr; }
  .phone { max-width: 400px; }
  .grid { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .grid thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .grid, .grid tbody { display: block; }
  .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name time" "svc urg" "stat stat" "act act"; gap: 4px 12px; background: var(--card); border: 1.5px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
  .row.urgent { border-left-color: var(--signal); }
  .row td, .row td:first-child { display: block; padding: 0; border: 0; }
  .c-name { grid-area: name; font-size: 1.125rem; } .c-time { grid-area: time; justify-self: end; color: var(--ink-2); }
  .c-svc { grid-area: svc; } .c-urg { grid-area: urg; justify-self: end; }
  .c-stat { grid-area: stat; padding-top: 6px !important; } .c-act { grid-area: act; text-align: left; }
  .c-act:not(:empty) { margin-top: 8px; }
  .c-act .btn { width: 100%; }
}
@media (max-width: 520px) {
  .u-row { grid-template-columns: 1fr; }
  .u-opt label { grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; min-height: 52px; padding: 8px 12px; }
  .u-opt .ico { margin-bottom: 0; }
  .form { padding: 18px 16px; }
  .ex { flex: 1 1 auto; justify-content: center; }
  .ph-screen { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
