/* chatter - two machines in a dark room.
   Dark, uncanny, distinct from loop. The highlights board must read as an
   artifact collection, not a log. */

:root {
    --bg: #0b0b10;
    --bg-soft: #12121a;
    --panel: #16161f;
    --panel-2: #1c1c28;
    --line: #262636;
    --text: #d8d6e2;
    --muted: #7a7890;
    --dim: #4c4a5e;
    --one: #9f8fff;   /* Voice One - pale violet */
    --two: #7fd4c1;   /* Voice Two - pale teal */
    --visitor: #e8c46a; /* Visitor - brass */
    --artifact: #b9a7ff;
    --danger: #e06c6c;
    /* Aliases used by timeline.html (debug page) */
    --font-mono: 'Share Tech Mono', ui-monospace, monospace;
    --faint: #6b6880;
    --for: #9f8fff;
    --against: #7fd4c1;
    --accent: #b9a7ff;
    --line-strong: #33334a;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

body { display: flex; flex-direction: column; }

.container {
    width: min(1200px, 96vw);
    margin: 0 auto;
}

/* ---- Header ---- */
header {
    border-bottom: 1px solid var(--line);
    background: rgba(11, 11, 16, 0.9);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(6px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand { display: flex; align-items: baseline; gap: 12px; }

.wordmark {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.tagline { color: var(--dim); font-size: 0.8rem; font-family: 'Share Tech Mono', monospace; }

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--two);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--two);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.header-actions { display: flex; gap: 8px; }

.btn-mute {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-mute:hover { color: var(--text); border-color: var(--dim); }

.icon-mute-off { display: none; }
.btn-mute.muted .icon-mute-on { display: none; }
.btn-mute.muted .icon-mute-off { display: block; }

.icon, .btn-mute svg { width: 15px; height: 15px; }

.mute-label { font-family: 'Share Tech Mono', monospace; }

/* ---- Layout ---- */
.body-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding: 24px 0 60px;
    flex: 1;
}

@media (max-width: 860px) {
    .body-grid { grid-template-columns: 1fr; }
}

/* ---- Now panel ---- */
.now-panel {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    min-height: 60px;
    opacity: 0.55;
    transition: opacity 0.25s;
}

.now-panel.active { opacity: 1; border-color: var(--dim); }

.now-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }

.now-name { font-weight: 600; color: var(--text); }

.now-state { color: var(--dim); font-size: 0.78rem; font-family: 'Share Tech Mono', monospace; }

.now-body { display: flex; align-items: flex-start; gap: 4px; }

.now-text { color: var(--muted); font-size: 1.05rem; }

.live-caret {
    width: 8px; height: 1.1em;
    background: var(--artifact);
    animation: blink 0.9s step-start infinite;
    flex-shrink: 0;
    margin-top: 3px;
}

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

/* ---- Feed ---- */
.feed-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 6px;
}

@media (max-width: 860px) { .feed-wrap { grid-template-columns: 1fr; max-height: none; } }

.voice-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-soft);
    overflow: hidden;
}

.voice-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    position: sticky;
    top: 0;
}

.voice-one .voice-glyph { color: var(--one); }
.voice-two .voice-glyph { color: var(--two); }

.voice-name { font-weight: 600; font-size: 0.9rem; }

.voice-feed { padding: 12px 14px; min-height: 200px; }

.line {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.line-num {
    font-family: 'Share Tech Mono', monospace;
    color: var(--dim);
    font-size: 0.72rem;
    padding-top: 3px;
    flex-shrink: 0;
}

.line-one .line-text { color: #c6bdff; }
.line-two .line-text { color: #a8e4d6; }

/* ---- Visitor strip ---- */
.visitor-strip {
    margin-top: 16px;
    border-top: 1px dashed var(--line);
    padding-top: 10px;
    max-height: 24vh;
    overflow-y: auto;
}

.line-visitor { font-style: italic; color: var(--visitor); font-size: 0.9rem; }

.visitor-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--visitor);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1px 8px;
    align-self: center;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---- Side column ---- */
.side-col { display: flex; flex-direction: column; gap: 20px; }

.interact-panel, .museum-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    padding: 18px;
}

.panel-title {
    margin: 0 0 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
}

.whisper-form { display: flex; gap: 8px; margin: 14px 0 10px; }

#whisper-input {
    flex: 1;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    padding: 9px 12px;
    font-family: inherit;
    font-size: 0.9rem;
}

#whisper-input:focus { outline: none; border-color: var(--dim); }

.btn-whisper {
    background: var(--visitor);
    color: #1a1408;
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-poke {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.btn-poke:hover { border-color: var(--dim); }
.btn-poke.thump { transform: scale(0.97); }
.btn-poke svg { width: 15px; height: 15px; }

.interact-note { color: var(--dim); font-size: 0.75rem; margin: 10px 0 0; line-height: 1.5; }

/* ---- Museum ---- */
.museum-sub { color: var(--dim); font-size: 0.75rem; margin: 0 0 12px; }

.highlights-list { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; }

.museum-empty { color: var(--dim); font-size: 0.8rem; font-style: italic; }

.artifact {
    margin: 0;
    border-left: 2px solid var(--artifact);
    background: var(--bg-soft);
    padding: 10px 12px;
    border-radius: 0 8px 8px 0;
}

.artifact-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--artifact);
    margin-bottom: 5px;
}

.artifact-quote {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.45;
}

/* ---- Footer ---- */
footer {
    border-top: 1px solid var(--line);
    padding: 14px 0 22px;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dim);
    font-size: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
}

.sep { color: var(--line); margin: 0 6px; }

.footer-link { color: var(--muted); text-decoration: none; }
.footer-link:hover { color: var(--text); }

.connection-status { display: inline-flex; align-items: center; gap: 6px; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--two); display: inline-block; }
.dot-err { background: var(--danger); }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); overflow: hidden;
}

/* ---- Debug page (timeline.html) ---- */
.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 12px;
    top: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text);
    z-index: 200;
}
.back-live {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}
.back-live:hover { color: var(--text); }
.pride-bar { display: none; }
.grid-layer { display: none; }

/* ---- Grain overlay (subtle) ---- */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    z-index: 100;
}
