/* Foreman (FRM19): the look shared by Projects and Setup. Amber is Foreman's accent. */
.fm-gap { margin: 18px 4px 6px; }
.fm-row { text-align: left; width: 100%; background: none; border: 0; color: inherit; font: inherit; gap: 10px; }
.fm-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fm-warn { border-left: 4px solid #f2a516; }
.fm-page { max-width: 860px; }
.fm-page .card { margin-bottom: 12px; }
.badge.fm-ticker { font-family: var(--font-mono, ui-monospace, monospace); letter-spacing: .06em; }
.badge.fm-amber { background: #f2a516; color: #1f2329; }
.badge.fm-edit { background: rgba(46, 160, 67, .15); color: var(--ok); }
.badge.fm-read { background: var(--surface-2); color: var(--muted); }
.badge.fm-done { background: rgba(46, 160, 67, .15); color: var(--ok); }
.badge.fm-failed { background: rgba(220, 53, 69, .15); color: var(--danger); }

/* Projects */
.fm-proj { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); }
.fm-proj:hover { border-color: #f2a516; }
.fm-proj-top { gap: 8px; align-items: center; flex-wrap: wrap; }
.fm-proj-name { font-size: 1.15rem; font-weight: 700; }
.fm-proj-facts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.fm-proj-facts span b { font-weight: 600; color: var(--text); }
.fm-tabs { display: flex; gap: 6px; margin: 4px 0 12px; overflow-x: auto; }
.fm-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 40px; }
.fm-tabs button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.fm-tabs .fm-count { display: inline-block; margin-left: 6px; background: #f2a516; color: #1f2329; border-radius: 999px; padding: 0 7px; font-size: .8em; }

/* Cards (approvals) */
.fm-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; background: var(--surface); }
.fm-card.waiting { border-left: 4px solid #f2a516; }
.fm-card-reason { font-weight: 600; margin-bottom: 4px; }
.fm-card-actions { gap: 8px; margin-top: 8px; }

/* A chat */
.fm-chat { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.fm-chat-head { padding: 2px 2px 0; }
.fm-chat-title { margin: 0; }
.fm-msgs { display: flex; flex-direction: column; gap: 10px; min-height: 120px; max-height: calc(100vh - 300px); max-height: calc(100dvh - 300px); overflow-y: auto; padding: 4px 2px; }
.fm-msg { display: flex; flex-direction: column; max-width: 88%; }
.fm-msg.me { align-self: flex-end; align-items: flex-end; }
.fm-msg.them, .fm-msg.fm-job { align-self: flex-start; }
.fm-bubble { padding: 10px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.fm-msg.me .fm-bubble { background: var(--accent); color: var(--on-accent); border-color: var(--accent); border-bottom-right-radius: 4px; }
.fm-msg.them .fm-bubble { border-bottom-left-radius: 4px; }
.fm-job .fm-bubble { border-style: dashed; min-width: 220px; }
.fm-job-top { gap: 8px; align-items: center; }
.fm-meta { font-size: .75rem; color: var(--muted); margin: 3px 6px 0; }
.fm-receipt { font-size: .8rem; color: var(--muted); margin: 4px 6px 0; font-family: var(--font-mono, ui-monospace, monospace); }
.fm-compose { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 0; background: var(--bg); padding: 6px 0 4px; }
.fm-box { flex: 1; resize: vertical; min-height: 48px; }
.fm-send { min-width: 76px; }
.fm-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.fm-dot.live { background: #f2a516; animation: fm-pulse 1.2s ease-in-out infinite; }
.fm-dot.done { background: var(--ok); }
.fm-dot.failed { background: var(--danger); }
.fm-dot.waiting_card { background: #f2a516; }
@keyframes fm-pulse { 50% { opacity: .35; } }

/* Setup */
.fm-sec { scroll-margin-top: 70px; }
.fm-line { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.fm-line:first-of-type { border-top: 0; }
.fm-light { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--muted); }
.fm-light.ok { background: var(--ok); }
.fm-light.warn { background: #f2a516; }
.fm-light.bad { background: var(--danger); }
.fm-line .grow > b { display: block; }
.fm-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.fm-bar > i { display: block; height: 100%; background: var(--ok); }
.fm-bar > i.warn { background: #f2a516; }
.fm-bar > i.bad { background: var(--danger); }
.fm-keyrow { gap: 8px; margin-top: 8px; }
.fm-keyrow .input { flex: 1; }
@media (min-width: 900px) { .fm-msgs { max-height: calc(100vh - 260px); } }

/* Release 1.0.1 (round 1): the project page's task board, files, voice chats and the file reader */
.fm-page-head { margin: 4px 2px 10px; }
.fm-copy-note { margin: 12px 4px; }
.fm-task { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); }
.fm-task.open { border-color: #f2a516; }
.fm-task-num { font-family: var(--font-mono, ui-monospace, monospace); color: var(--muted); min-width: 2.2em; }
.fm-task-about { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fm-steps, .fm-md ul { list-style: none; padding-left: 0; margin: 8px 0 0; }
.fm-steps li, .fm-md li { padding: 3px 0 3px 22px; position: relative; overflow-wrap: anywhere; }
.fm-md li::before { content: "•"; position: absolute; left: 6px; color: var(--muted); }
.fm-md li.sub { margin-left: 18px; }
.fm-steps li.tick::before, .fm-md li.tick::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border: 2px solid var(--muted); border-radius: 3px; }
.fm-steps li.done::before, .fm-md li.tick.done::before { background: var(--ok); border-color: var(--ok); }
.fm-steps li.done, .fm-md li.tick.done { color: var(--muted); }
.fm-crumbs { margin: 2px 2px 10px; overflow-wrap: anywhere; }
.fm-crumb { background: none; border: 0; padding: 4px 2px; font: inherit; color: var(--accent); cursor: pointer; font-weight: 600; }
.fm-ico { width: 1.2em; text-align: center; color: #f2a516; font-weight: 700; flex: none; }
.fm-left-out { margin: 10px 4px; }
.fm-path { margin: 2px 4px 8px; overflow-wrap: anywhere; font-family: var(--font-mono, ui-monospace, monospace); }
.fm-plain { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: .85rem; }
.fm-md { line-height: 1.5; overflow-wrap: anywhere; }
.fm-md h2, .fm-md h3, .fm-md h4, .fm-md h5, .fm-md h6 { margin: 16px 0 6px; line-height: 1.25; }
.fm-md h2 { font-size: 1.25rem; } .fm-md h3 { font-size: 1.1rem; } .fm-md h4, .fm-md h5, .fm-md h6 { font-size: 1rem; }
.fm-md p { margin: 6px 0; }
.fm-md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.fm-md blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid #f2a516; color: var(--muted); }
.fm-md pre { white-space: pre-wrap; background: var(--surface-2); padding: 10px; border-radius: 8px; font-size: .85rem; }
.fm-md code { background: var(--surface-2); padding: 0 4px; border-radius: 4px; font-size: .9em; }
.fm-md .fm-link { color: var(--accent); }
.fm-table { overflow-x: auto; margin: 8px 0; }
.fm-table table { border-collapse: collapse; font-size: .85rem; min-width: 100%; }
.fm-table th, .fm-table td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; min-width: 70px; max-width: 360px; }
.fm-table th { background: var(--surface-2); }
.fm-pic img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin: 0 auto; }

/* Build step 1: Connections */
.fm-cost-top .fm-cost-big { font-size: 1.8rem; font-weight: 800; margin: 2px 0 4px; }
.fm-group { align-items: center; }
.fm-group-side { text-align: right; min-width: 64px; }
.fm-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); }
.fm-item .small { margin-top: 3px; }
.fm-ok-text { color: var(--ok); }
.fm-bad-text { color: var(--danger); }
.fm-code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 1.3rem; letter-spacing: .12em; }
.fm-ai-actions .btn.block { margin-top: 8px; }

/* FRM20 build step 2: notices, thinking and the paused banner */
.fm-note .fm-bubble { background: transparent; border: 1px dashed var(--line, #ccc); color: var(--muted, #666); font-size: .9em; }
.fm-note { align-self: center; max-width: 90%; }
.fm-thinking .fm-bubble { color: var(--muted, #666); font-style: italic; }
.fm-paused { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg, #fff4d6); color: var(--warn-ink, #6b4e00); font-size: .92em; }
.fm-pause-state { margin: 10px 0; }
