/* W5 THE WIDGET - the chat page's style sheet (seat Y4, 2026-10-15) - and since D5, THE ASK-ME PANEL (SITE-V5): the
   page the yard's own site frames in its "ask me" panel, drawn in the site's own v5 style (Mike: "like in this chat
   here - simple, very comfy"). The "ask me" line on top - one input, its drawn caret, no box and no button - and the
   thread under it, each turn its who and when, then its words. It reads on a phone first; full-size in its own tab. */

:root {
  --slate: #353F47;
  --slate-2: #5B6670;
  --green: #226A00;
  --ask: #FAFAF8;
  --line: #DADFDB;
  --alert: #B45309;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ask);
  color: var(--slate);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

#yv-chat {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
  padding: 22px;
}

/* the heading and the courtesy counts are for a screen reader: the line itself says "ask me" */
h1,
.count {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: var(--green);
}

/* the "ask me" line: Enter sends. Its caret is drawn after the input and shown before it (order), so the line's own
   state can hide it: it rests while the line is focused (the browser's own caret blinks there) or holds words. */
.say,
.contact {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.say {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 4px;
  background: var(--ask);
}

.say:focus-within,
.contact:focus-within {
  border-bottom: 2px solid var(--slate);
  padding-bottom: 9px;
}

.box,
.way {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--slate);
  font: inherit;
}

.box {
  font-size: 20px;
}

.box::placeholder,
.way::placeholder {
  color: var(--slate);
  opacity: 0.65;
}

.caret {
  order: -1;
  flex: none;
  display: inline-block;
  width: 2px;
  height: 26px;
  background: var(--slate);
  animation: askLineBlink 1.1s steps(1, end) infinite;
}

@keyframes askLineBlink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
}

.say:focus-within .caret,
.box:not(:placeholder-shown) + .caret {
  visibility: hidden;
}

/* the thread: who and when, then the words */
.log {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.turn {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta {
  margin: 0;
  font-size: 14px;
  color: var(--slate-2);
}

.who {
  font-weight: 700;
  color: var(--slate);
}

.turn.them .who {
  color: var(--green);
}

.text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.waiting,
.status,
.kept,
.closed,
.new-tab {
  margin: 0;
  font-size: 14px;
  color: var(--slate-2);
}

.status {
  color: var(--alert);
}

.status:empty {
  display: none;
}

[hidden] {
  display: none !important;
}
