/* DigitalSheeps extras: Flock Cam, status page, careers, team statuses, Baa-sistant chat */

.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--sun); border: var(--line); border-radius: 999px; padding: .5rem 1rem; font-weight: 900; box-shadow: var(--pop-sm); }
.skip-link:focus { top: 12px; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 4px solid var(--pink); outline-offset: 3px; }

/* ---------- Live: Flock Cam + Status ---------- */
.live-sec { background: var(--sky-2); }
.live-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: start; }
.cam { margin: 0; background: #fff; border: var(--line); border-radius: 22px; box-shadow: var(--pop); padding: 12px; transform: rotate(-1deg); }
.cam-screen { position: relative; border: var(--line); border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 4 / 3; }
.cam-screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(1.05); animation: cam-breathe 6s ease-in-out infinite; }
.cam-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 2px, transparent 2px 4px); pointer-events: none; }
.cam-screen > span:not(.cam-scan) { position: absolute; font: 800 .82rem/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: .04em; }
.cam-rec { top: 12px; left: 12px; display: flex; align-items: center; gap: .4rem; }
.cam-rec i { width: 12px; height: 12px; border-radius: 50%; background: #ff3b3b; animation: blink 1s steps(2, start) infinite; }
.cam-label { top: 12px; right: 12px; }
.cam-time { bottom: 12px; left: 12px; }
.cam-viewers { bottom: 12px; right: 12px; background: rgba(0,0,0,.45); padding: .3rem .5rem; border-radius: 8px; }
.cam figcaption { padding: .9rem .4rem .2rem; }
.cam-log { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .92rem; color: var(--muted); min-height: 4.6em; }
.cam-log li { padding: .1rem 0; }
.cam-log li b { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); margin-right: .4rem; }
@keyframes cam-breathe { 0%, 100% { transform: scale(1.02); } 50% { transform: scale(1.045); } }
@keyframes blink { to { visibility: hidden; } }

.status { background: #fff; border: var(--line); border-radius: 22px; box-shadow: var(--pop); padding: 1.3rem 1.3rem 1rem; transform: rotate(.8deg); }
.status-top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding-bottom: .8rem; border-bottom: 2px dashed #d9d6ea; }
.status-ok { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; }
.status-ok .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--grass); box-shadow: 0 0 0 0 rgba(92,196,107,.6); animation: pulse 2s infinite; }
.status-top small { color: var(--muted); font-weight: 700; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(92,196,107,0); } 100% { box-shadow: 0 0 0 0 rgba(92,196,107,0); } }
.status-list { list-style: none; margin: .4rem 0 1rem; padding: 0; }
.status-list li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding: .55rem 0; border-bottom: 1px solid #eeecf6; align-items: center; }
.status-list li span:first-child { font-weight: 800; }
.status-list em { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.st { font-size: .8rem; font-weight: 900; padding: .2rem .6rem; border-radius: 999px; border: 2px solid var(--ink); white-space: nowrap; }
.st.ok { background: #d8f5dc; }
.st.warn { background: #fff0b8; }
.st.down { background: #ffd0d0; }
.st.maint { background: #dbeaff; }
.uptime-head { display: flex; justify-content: space-between; font-weight: 800; font-size: .92rem; margin-bottom: .4rem; }
.bars { display: grid; grid-template-columns: repeat(60, 1fr); gap: 2px; height: 34px; }
.bars i { display: block; background: var(--grass); border-radius: 2px; transform-origin: bottom; }
.bars i.w { background: var(--sun); }
.bars i.d { background: #ff6b6b; }
.incidents { margin-top: 1rem; }
.incidents summary { cursor: pointer; font-weight: 900; }
.incidents ul { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .92rem; color: var(--muted); }
.incidents li { margin-bottom: .4rem; }
.incidents b { color: var(--ink); }

/* ---------- Careers ---------- */
.jobs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.job { background: #fff; border: var(--line); border-radius: 20px; box-shadow: var(--pop-sm); padding: 1.3rem; display: flex; flex-direction: column; rotate: var(--r, 0deg); transition: rotate .25s var(--bounce), translate .25s var(--bounce); }
.job:hover { rotate: 0deg; translate: 0 -4px; }
.job h3 { font-size: 1.35rem; }
.job p:not(.job-tags) { font-size: .95rem; color: var(--muted); flex: 1; }
.job-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.job-tags span { font-size: .75rem; font-weight: 900; background: var(--pink-2); border: 2px solid var(--ink); border-radius: 999px; padding: .1rem .55rem; }
.job-apply { width: 100%; min-height: 48px; font-size: 1rem; }
.job.eaten { background: #f3f1fa; }
.job.eaten .job-apply { background: #fff; }
.job-eaten-msg { font-weight: 900; color: var(--pink) !important; }

/* ---------- Team "Currently" status ---------- */
.member .now { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: .2rem .7rem; font-size: .82rem; font-weight: 800; margin: 0 0 .7rem; cursor: pointer; max-width: 100%; text-align: left; line-height: 1.3; transition: rotate .2s var(--bounce), scale .2s var(--bounce); }
.member .now:hover { rotate: -2deg; scale: 1.03; }
.member .now i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--grass); }
.member .now b { font-weight: 900; }

/* ---------- Baa-sistant chat ---------- */
.bot-fab { position: fixed; right: 16px; bottom: 16px; z-index: 58; display: flex; align-items: center; gap: .5rem; background: var(--pink); color: #fff; border: var(--line); border-radius: 999px; padding: .55rem 1.1rem .55rem .6rem; font-weight: 900; box-shadow: var(--pop-sm); cursor: pointer; transition: rotate .2s var(--bounce), scale .2s var(--bounce); }
.bot-fab:hover { rotate: 3deg; scale: 1.05; }
.bot-fab .bot-face { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); display: grid; place-items: center; font-size: 1.2rem; }
.bot-fab .ping { position: absolute; top: -6px; right: -4px; background: var(--sun); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; font-size: .72rem; padding: 0 .4rem; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.bot { position: fixed; right: 16px; bottom: 84px; z-index: 80; width: min(370px, calc(100vw - 32px)); height: min(520px, calc(100dvh - 120px)); display: flex; flex-direction: column; background: var(--cream); border: var(--line); border-radius: 22px; box-shadow: var(--pop); overflow: hidden; transform-origin: bottom right; animation: bot-in .35s var(--bounce); }
.bot[hidden] { display: none; }
@keyframes bot-in { from { transform: scale(.6); opacity: 0; } }
.bot-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--sky); border-bottom: var(--line); }
.bot-head .bot-face { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); display: grid; place-items: center; font-size: 1.4rem; }
.bot-head div { flex: 1; line-height: 1.2; }
.bot-head strong { font-family: var(--display); font-size: 1.2rem; font-weight: 400; display: block; }
.bot-head small { font-weight: 700; }
.bot-close { background: #fff; border: 2px solid var(--ink); border-radius: 50%; width: 36px; height: 36px; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.bot-log { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; overscroll-behavior: contain; }
.bot-msg { max-width: 85%; padding: .55rem .8rem; border: 2px solid var(--ink); border-radius: 16px; font-size: .95rem; line-height: 1.4; animation: bot-in .25s var(--bounce); }
.bot-msg.them { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.bot-msg.me { background: var(--sun); align-self: flex-end; border-bottom-right-radius: 4px; }
.bot-msg.dots { display: flex; gap: 4px; }
.bot-msg.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bob .9s infinite; }
.bot-msg.dots span:nth-child(2) { animation-delay: .15s; }
.bot-msg.dots span:nth-child(3) { animation-delay: .3s; }
.bot-chips { display: flex; gap: .4rem; flex-wrap: wrap; padding: 0 .9rem .6rem; }
.bot-chips button { background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: .3rem .7rem; font-size: .82rem; font-weight: 800; cursor: pointer; }
.bot-chips button:hover { background: var(--pink-2); }
.bot-form { display: flex; gap: .4rem; padding: .6rem; border-top: var(--line); background: #fff; }
.bot-form input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 999px; padding: .55rem .9rem; font: inherit; font-size: 16px; }
.bot-form button { border: 2px solid var(--ink); background: var(--pink); color: #fff; border-radius: 999px; padding: 0 1rem; font-weight: 900; cursor: pointer; }

@media (max-width: 1100px) { .jobs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) {
  .live-grid { grid-template-columns: 1fr; }
  .cam, .status { transform: none; }
}
@media (max-width: 600px) {
  .jobs { grid-template-columns: 1fr; }
  .job { rotate: 0deg; }
  .bot-fab { padding: .45rem; right: 12px; bottom: 12px; }
  .bot-fab .label { display: none; }
  .bot { right: 8px; left: 8px; width: auto; bottom: 76px; height: min(520px, calc(100dvh - 100px)); }
  .cam-screen > span:not(.cam-scan) { font-size: .7rem; }
  .bars { height: 26px; gap: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .cam-screen img, .cam-rec i, .status-ok .dot, .bot-fab .ping, .bot, .bot-msg, .bot-msg.dots span { animation: none !important; }
}

/* Easier to tap on phones */
.incidents summary { padding: .5rem 0; cursor: pointer; }
@media (pointer: coarse) { .member .now { padding: .45rem .8rem; } }
