/* /automations only (site v5 phase 2, 2026-11-03). Kit classes from inner.css (.ks .kapp .kphone .kti .kc .ex4 .s-*);
   colours from the page theme (var(--pa) etc.); spacing from the shared tokens only. */

/* ---------- Centerpiece tweaks: runs table gets the wider column ---------- */
.au-ks .au-grid { grid-template-columns: 1fr 1.45fr; }
@media (min-width: 80rem) { .au-ks .kapp { width: 50.5em; } .au-ks .ktb { padding-right: 2.2em; } }
.au-ks .ktb td, .au-ks .ktb th { padding-left: 0.3em; padding-right: 0.3em; }
.au-ks .ktb td:first-child { color: #64748B; }
.au-draft { padding: 0.65em 0.75em; border-radius: 0.8em 0.8em 0.8em 0.25em; background: var(--pa-soft); font-size: 0.8em; line-height: 1.35; }
.au-draft p { color: #0B1F3B; }
.au-draft em { display: block; margin-top: 0.35em; font-size: 0.9em; color: var(--pa-ink); }

/* ---------- Six example rows: copy left, a mini-UI on a tinted stage right ---------- */
.au-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.au-row { max-width: none; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: stretch; padding: 14px; border-radius: var(--r-panel); background: #fff;
  box-shadow: 0 0 0 1px rgba(11, 31, 59, .06), 0 18px 40px -30px rgba(11, 31, 59, .35); }
.au-copy { padding: 18px 14px 18px 18px; display: grid; align-content: center; gap: 12px; }
.au-copy h3 { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 1.375rem; line-height: 1.15; letter-spacing: -0.02em; }
.au-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--pa-soft); color: var(--pa); }
.au-ic .ic { width: 20px; height: 20px; }
.au-fdr { margin: 0; display: grid; gap: 8px; }
.au-fdr > div { display: grid; grid-template-columns: 4.5rem 1fr; gap: 10px; align-items: baseline; }
.au-fdr dt { font-size: 0.8125rem; font-weight: 600; color: var(--pa); }
.au-fdr dd { margin: 0; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.au-fdr > div:last-child dd { color: var(--ink); font-weight: 600; }

.au-vis { position: relative; min-height: 250px; border-radius: var(--r-inner); overflow: hidden; display: grid; place-items: center; gap: 12px; padding: 24px; font-size: 13px;
  background: radial-gradient(22rem 12rem at 100% 0, var(--g1), transparent 65%), radial-gradient(18rem 10rem at 0 100%, var(--g2), transparent 65%), var(--pa-tint); }
.au-row:nth-child(even) .au-vis { background: radial-gradient(22rem 12rem at 0 0, var(--g1), transparent 65%), radial-gradient(18rem 10rem at 100% 100%, var(--g3), transparent 65%), var(--pa-tint); }
.au-card { width: min(100%, 24rem); padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(11, 31, 59, .06), 0 22px 40px -24px rgba(11, 31, 59, .4); }
.au-card p { margin: 0; }
.au-card em { font-style: normal; color: #64748B; }

/* small kit rows (same look as the /systems mini-screens) */
.au-vis .sv-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.au-vis .sv-h b { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: #0B1F3B; }
.au-vis .sv-r { display: grid; grid-template-columns: 4px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px 6px 0; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(11, 31, 59, .07), 0 0 0 1px #EEF2F7; margin-top: 6px; overflow: hidden; }
.au-vis .sv-r > i { align-self: stretch; background: var(--st); }
.au-vis .sv-r span { min-width: 0; }
.au-vis .sv-r b { display: block; font-size: 12px; line-height: 1.2; font-weight: 600; color: #0B1F3B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-vis .sv-r em { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-vis .sv-r u { text-decoration: none; padding: 2px 8px; border-radius: 999px; background: var(--st-bg); color: var(--st); font-size: 11px; font-weight: 600; white-space: nowrap; }
.au-btns { display: flex; gap: 6px; margin-top: 10px !important; }
.au-btns u { text-decoration: none; padding: 5px 14px; border-radius: 999px; background: var(--pa); color: #fff; font-size: 12px; font-weight: 600; }
.au-btns u.o { background: #fff; color: #0B1F3B; box-shadow: inset 0 0 0 1px #E2E8F0; }

/* 1. follow-ups: enquiry + draft bubble */
.au-bub { margin-top: 10px; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--pa-soft); }
.au-bub p { color: #0B1F3B; line-height: 1.4; }
.au-bub em { display: block; margin-top: 4px; font-size: 11px; color: var(--pa-ink); font-weight: 600; }

/* 2. reminders: an email preview behind a log */
.au-mail { width: min(100%, 21rem); justify-self: start; transform: rotate(-1.5deg); }
.au-mh { display: flex; align-items: center; gap: 8px; }
.au-mh b { font-size: 13px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pa); }
.au-mt { margin: 4px 0 8px !important; font-size: 11px; color: #64748B; }
.au-ln { display: block; height: 7px; border-radius: 4px; background: #EEF2F7; margin-top: 6px; } .au-ln.s2 { width: 64%; }
.au-c2 { justify-self: end; margin-top: -4px; }

/* 3. report */
.au-k { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.au-k span { display: grid; gap: 2px; padding: 8px; border-radius: 10px; background: #F7F9FD; box-shadow: inset 0 0 0 1px #EEF2F7; }
.au-k em { font-size: 11px; }
.au-k b { font-family: var(--font-head); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: #0B1F3B; }
.au-bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; margin-top: 12px; }
.au-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--pa) 30%, #fff); height: 40%; }
.au-bars i:nth-child(2) { height: 55%; } .au-bars i:nth-child(3) { height: 48%; } .au-bars i:nth-child(4) { height: 70%; } .au-bars i:nth-child(5) { height: 62%; }
.au-bars i:nth-child(6) { height: 80%; } .au-bars i:nth-child(7) { height: 58%; } .au-bars i:nth-child(8) { height: 74%; } .au-bars i:nth-child(9) { height: 66%; }
.au-bars i:nth-child(10) { height: 88%; } .au-bars i:nth-child(11) { height: 72%; } .au-bars i:nth-child(12) { height: 95%; background: var(--pa); }
.au-note { margin-top: 8px !important; font-size: 11px; color: #64748B; }

/* 4. alerts: notification stack */
.au-c3 { display: grid; gap: 8px; background: transparent; box-shadow: none; padding: 0; }
.au-note-card { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(11, 31, 59, .06), 0 18px 34px -22px rgba(11, 31, 59, .4); border-left: 4px solid var(--st); }
.au-note-card b { display: block; font-size: 13px; color: #0B1F3B; }
.au-note-card em { display: block; font-size: 11px; }
.au-note-card:nth-child(2) { margin-left: 18px; } .au-note-card:nth-child(3) { margin-left: 36px; }

/* 5. estimates: day 1 / 3 / 7 / 14 */
.au-days { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.au-days::before { content: ""; position: absolute; left: 12%; right: 12%; top: 5px; height: 2px; background: #E2E8F0; }
.au-days li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 11px; color: #64748B; }
.au-days i { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #CBD5E1; }
.au-days li.on { color: #0B1F3B; font-weight: 600; }
.au-days li.on i { background: var(--pa); box-shadow: 0 0 0 4px var(--pa-soft); }

/* 6. scheduling: day column with a held slot */
.au-slots { display: grid; gap: 6px; margin-top: 6px; }
.au-slots span { display: grid; grid-template-columns: 3rem 1fr; gap: 8px; align-items: center; }
.au-slots em { font-size: 11px; }
.au-slots b { display: block; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--st-bg, #F7F9FD); color: var(--st, #0B1F3B); border-left: 3px solid var(--st, #E2E8F0); }
.au-slots .au-held { outline: 2px dashed var(--st); outline-offset: -2px; }
.au-slots .au-free { color: #94A3B8; background: #F7F9FD; border-left-color: #E2E8F0; }

.au-cap { margin-top: var(--after); }

/* ---------- Motion (scoped under .motion; resting state = final) ---------- */
/* rows rise in via the shared .reveal (motion.js); the draft bubble breathes while in view */
.motion .au-bub { animation: kb-float 5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .au-rules * { animation: none !important; } }

/* ---------- Tablet / phone ---------- */
@media (max-width: 79.99rem) { .au-ks .kph-btns + .kph-c { display: none; } .au-ks .au-draft p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } }
@media (max-width: 63.99rem) {
  .au-row { grid-template-columns: 1fr; }
  .au-vis { order: -1; }
  .au-copy { padding: 12px 10px 4px; }
}
@media (max-width: 47.99rem) {
  .au-row { padding: 10px; }
  .au-vis { min-height: 0; padding: 18px 14px; }
  .au-k { grid-template-columns: repeat(2, 1fr); }
  .au-fdr > div { grid-template-columns: 4rem 1fr; }
}

/* the shared ".section + .section" hairline outranks inner.css "main > .section { border-top: 0 }" (same note as /home-services) */
main > .section + .section { border-top: 0; }
