/* =============================================================================
   Roadmap (console), the rich text editor, and What's new (every agency)
   5px corners and room to breathe, as on Logs.
   ============================================================================= */

/* ---- Page ------------------------------------------------------------------ */
/* RM-079: one header, one toolbar and one gutter on Board, In Testing and Shipped.
   Every band (header, toolbar, body) uses the same side gutter and an even 18px
   above and below its divider. */
.rm-page .rm-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 18px var(--gutter, 24px); }
.rm-header__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.rm-sites { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rm-sites:not(:last-child) { padding-right: 12px; border-right: 1px solid var(--border-subtle, #e8ebed); }
.rm-site { text-decoration: none; white-space: nowrap; }
.rm-site .icon { color: var(--text-muted, #8b929b); }
.rm-site:hover .icon, .rm-site:focus-visible .icon { color: var(--accent, #6d5cff); }
.rm-button { border-radius: 5px; }
.rm-button--danger { color: var(--status-danger, #d92d20); }

.rm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px var(--gutter, 24px); }
.rm-search { display: inline-flex; align-items: center; gap: 8px; min-width: 240px; border-radius: 5px; }
.rm-search input { border: 0; outline: 0; background: transparent; font: inherit; color: inherit; min-width: 0; flex: 1; }
/* The filter reuses .record-tabs for its look, but not its layout: that class
   pulls itself up by the panel gutter and draws its own underline, which left
   the pills sitting higher than the search box over a line that stopped short. */
.rm-toolbar .rm-type-filter { margin: 0; padding: 0; border-bottom: 0; overflow: visible; align-items: center; gap: 6px; }
.rm-type-filter .record-tab { display: inline-flex; align-items: center; height: var(--control-height, 36px); padding: 0 14px; margin: 0; border-radius: 5px; border: 1px solid var(--border-subtle, #e8ebed); color: var(--text-secondary, #43484f); }
.rm-type-filter .record-tab:hover { border-color: var(--border-strong, #d0d5dd); }
.rm-type-filter .record-tab--active,
.rm-type-filter .record-tab--active:hover { background: var(--accent-tint, #f0edff); border-color: var(--accent, #6d5cff); color: var(--accent, #6d5cff); font-weight: 600; }
.rm-toolbar__count { margin-left: auto; font-size: 12.5px; color: var(--text-muted, #8b929b); }

/* The body bands own the gutter, so the scroll area must not add a second one. */
.rm-page .rm-scroll { padding: 0; }

/* ---- Board ------------------------------------------------------------------ */
.rm-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 16px;
    padding: 18px var(--gutter, 24px) 28px;
    align-items: start;
    overflow-x: auto;
}

.rm-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border-subtle, #e4e7ec);
    border-radius: 5px;
    background: var(--surface-subtle, #f8f9fb);
}

.rm-column__head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.rm-column__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rm-column__title { font-weight: 700; font-size: 14px; color: var(--text-primary, #101828); }
.rm-column__hint { font-size: 12px; color: var(--text-muted, #667085); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-column__count {
    margin-left: auto; min-width: 22px; padding: 1px 8px; border-radius: 999px;
    background: var(--surface-panel, #fff); border: 1px solid var(--border-subtle, #e4e7ec);
    font-size: 11.5px; font-weight: 700; text-align: center; color: var(--text-muted, #667085);
}

.rm-column__cards { display: flex; flex-direction: column; gap: 8px; min-height: 90px; padding: 2px; border-radius: 5px; transition: background 140ms ease; }
.rm-column__cards--over { background: rgba(99, 102, 241, 0.06); outline: 1px dashed rgba(99, 102, 241, 0.45); }
.rm-column__empty { padding: 22px 10px; text-align: center; font-size: 12.5px; color: var(--text-muted, #667085); border: 1px dashed var(--border-subtle, #d0d5dd); border-radius: 5px; }
.rm-drop-marker { height: 3px; border-radius: 2px; background: var(--am-blue); margin: -2px 0; }

.rm-card,
.rm-test-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle, #e4e7ec);
    border-radius: 5px;
    background: var(--surface-panel, #fff);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.rm-card { cursor: grab; user-select: none; transition: box-shadow 140ms ease, transform 140ms ease; }
.rm-card:hover { box-shadow: 0 6px 16px rgba(16, 24, 40, 0.09); transform: translateY(-1px); }
.rm-card:focus-visible { outline: 2px solid var(--am-blue); outline-offset: 2px; }
.rm-card--dragging { opacity: 0.4; cursor: grabbing; }

.rm-card__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rm-card__title { font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--text-primary, #101828); overflow-wrap: anywhere; }
.rm-card__desc { font-size: 12.5px; line-height: 1.45; color: var(--text-muted, #667085); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-card__foot { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.rm-card__muted { font-size: 12px; color: var(--text-muted, #667085); }

.rm-type { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.rm-type--feature { background: rgba(99, 102, 241, 0.12); color: var(--am-blue); }
.rm-type--improvement { background: rgba(14, 165, 233, 0.12); color: var(--status-info); }
.rm-type--fix { background: rgba(245, 158, 11, 0.14); color: var(--status-warning); }
.rm-module { font-size: 11.5px; padding: 2px 8px; border-radius: 4px; background: var(--status-neutral-tint, #f2f4f7); color: var(--status-neutral, #475467); }
.rm-priority { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: #7fa7e0; flex: none; }
.rm-priority--urgent { background: var(--status-danger); }
.rm-priority--high { background: var(--status-warning); }
.rm-priority--low { background: #8b93a7; }

.rm-task { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 600; }
.rm-task--neutral { background: var(--status-neutral-tint, #f2f4f7); color: var(--status-neutral, #475467); }
.rm-task--info { background: var(--status-info-tint, #eff4ff); color: var(--status-info, #1e70ff); }
.rm-task--warning { background: var(--status-warning-tint, #fffaeb); color: var(--status-warning, #b26a00); }
.rm-task--success { background: var(--status-success-tint, #ecfdf3); color: var(--status-success, #067647); }

.rm-quick__open {
    display: flex; align-items: center; gap: 6px; width: 100%;
    padding: 8px 10px; border: 0; border-radius: 5px; background: transparent;
    font: inherit; font-size: 13px; color: var(--text-muted, #667085); cursor: pointer;
}
.rm-quick__open:hover { background: var(--surface-panel, #fff); color: var(--text-primary, #101828); }
.rm-quick__input { border-radius: 5px; }

/* ---- In Testing --------------------------------------------------------------- */
.rm-testing { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; padding: 18px var(--gutter, 24px) 28px; }
.rm-test-card { gap: 12px; padding: 16px 18px; }
.rm-test-card--ready { border-color: rgba(18, 183, 106, 0.45); }
.rm-test-card__since { margin-left: auto; }
.rm-test-card__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 2px; }
.rm-progress { display: flex; align-items: center; gap: 10px; }
.rm-progress__bar { flex: 1; height: 6px; border-radius: 3px; background: var(--status-neutral-tint, #eaecf0); overflow: hidden; }
.rm-progress__fill { display: block; height: 100%; border-radius: 3px; background: var(--status-success, #12b76a); }
.rm-progress__text { font-size: 12px; color: var(--text-muted, #667085); white-space: nowrap; }

/* ---- Shipped ---------------------------------------------------------------- */
.rm-table-wrap { padding: 18px var(--gutter, 24px) 28px; }
.rm-table td { padding-top: 13px; padding-bottom: 13px; vertical-align: middle; }
.rm-table__row { cursor: pointer; }
.rm-table__row:hover { background: var(--surface-hover, #f5f7fa); }
.rm-table__title { font-weight: 600; color: var(--text-primary, #101828); }
.rm-code { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--status-neutral-tint, #f2f4f7); }
.rm-after { font-size: 12.5px; color: var(--text-muted, #667085); }
.rm-after--good { color: var(--status-success, #067647); }
.rm-after--bad { color: var(--status-danger, #d92d20); font-weight: 600; }

/* ---- Panel ------------------------------------------------------------------- */
.rm-panel { display: flex; flex-direction: column; gap: 4px; }
.rm-panel .form-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.rm-panel .form-field__control { border-radius: 5px; }
.rm-panel__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.rm-checklist { list-style: none; margin: 12px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rm-checklist__line { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px; }
.rm-checklist__line input { width: 16px; height: 16px; flex: none; }
.rm-checklist__line.is-done .rm-checklist__text { text-decoration: line-through; color: var(--text-muted, #667085); }
.rm-checklist__text { flex: 1; font-size: 13.5px; overflow-wrap: anywhere; }
.rm-checklist__remove { border: 0; background: transparent; color: var(--text-muted, #667085); cursor: pointer; padding: 2px; border-radius: 4px; display: inline-flex; }
.rm-checklist__remove:hover { color: var(--status-danger, #d92d20); background: var(--status-danger-tint, #fef3f2); }
.rm-checklist__input { border-radius: 5px; }
.rm-linked { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.rm-linked__name { font-weight: 600; flex: 1; min-width: 160px; }
.rm-linked__none { margin: 12px 0 10px; }
.rm-linked__hint { display: flex; align-items: center; gap: 10px; margin-top: 12px; border-radius: 5px; }
.rm-linked__hint .button { margin-left: auto; }
.rm-history { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.rm-history li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border-subtle, #e4e7ec); font-size: 13px; }
.rm-history li:last-child { border-bottom: 0; }
.rm-history__when { color: var(--text-muted, #667085); font-variant-numeric: tabular-nums; }
.rm-announcement { margin: 12px 0; padding: 14px 16px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px; display: flex; flex-direction: column; gap: 8px; }
.rm-announcement__title { font-weight: 700; font-size: 15px; }
.rm-ship__notice { border-radius: 5px; margin-bottom: 8px; }
.rm-switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.rm-switch input { width: 16px; height: 16px; }

@media (max-width: 900px) {
    .rm-board { grid-template-columns: repeat(3, minmax(260px, 86vw)); }
}
@media (max-width: 720px) {
    .rm-page .rm-header, .rm-toolbar, .rm-board, .rm-testing, .rm-table-wrap, .rm-shipped-layout { padding-left: 16px; padding-right: 16px; }
    .rm-search { min-width: 0; flex: 1 1 100%; }
    .rm-header__actions { width: 100%; margin-left: 0; }
    .rm-sites { flex: 1 1 100%; }
    .rm-sites:not(:last-child) { padding-right: 0; border-right: 0; }
    .rm-site, .rm-header__actions > .button { flex: 1 1 0; justify-content: center; }
    .rm-toolbar .rm-type-filter { flex: 1 1 auto; }
    .rm-history li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---- Rich text ------------------------------------------------------------- */
.rich-text { border: 1px solid var(--border-subtle, #d0d5dd); border-radius: 5px; background: var(--surface-panel, #fff); overflow: hidden; }
.rich-text:focus-within { border-color: var(--am-blue); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.rich-text__toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border-subtle, #e4e7ec); background: var(--surface-subtle, #f8f9fb); }
.rich-text__tool { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 4px; background: transparent; color: var(--text-primary, #344054); font-weight: 700; cursor: pointer; }
.rich-text__tool:hover { background: var(--surface-panel, #fff); box-shadow: 0 0 0 1px var(--border-subtle, #e4e7ec); }
.rich-text__editor { min-height: 140px; max-height: 360px; overflow: auto; padding: 12px 14px; font-size: 14px; line-height: 1.6; outline: none; }
.rich-text--empty .rich-text__editor::before { content: attr(data-placeholder); color: var(--text-muted, #98a2b3); pointer-events: none; }
.rich-text__editor h3, .rich-text__render h3 { font-size: 15px; margin: 10px 0 4px; }
.rich-text__editor blockquote, .rich-text__render blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--am-blue-soft-hover); color: var(--text-muted, #475467); }
.rich-text__editor ul, .rich-text__editor ol, .rich-text__render ul, .rich-text__render ol { padding-left: 22px; margin: 6px 0; }
.rich-text__render { font-size: 13.5px; line-height: 1.6; color: var(--text-primary, #344054); overflow-wrap: anywhere; }
.rich-text__render p { margin: 0 0 8px; }
.rich-text__render a { color: var(--am-blue); text-decoration: underline; }

/* ---- What's new (every agency) -------------------------------------------------- */
.header-whats-new { position: relative; }
.header-whats-new[hidden] { display: none; }
.whats-new-panel__titles, .whats-new-panel__head .notif-panel__titles { display: flex; align-items: center; gap: 10px; }
.whats-new-panel__mark { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 5px; background: rgba(99, 102, 241, 0.12); color: var(--am-blue); }
.whats-new-panel__list { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 24px; }
/* The card (22 Oct 2026): the module's icon in a tinted tile, then the type,
   module and date, the title and the message; console actions underneath. */
.whats-new-card { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px; background: var(--surface-panel, #fff); transition: border-color 0.4s ease, background-color 0.4s ease; }
.whats-new-card.is-new { border-color: var(--am-blue, #19213b); background: var(--surface-subtle, #f8f9fc); }
.whats-new-card.is-removed { opacity: 0.62; border-style: dashed; }
.whats-new-card__icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 5px; background: rgba(25, 33, 59, 0.08); color: var(--am-blue, #19213b); }
.whats-new-card--improvement .whats-new-card__icon { background: rgba(14, 165, 233, 0.12); color: var(--status-info); }
.whats-new-card--fix .whats-new-card__icon { background: rgba(245, 158, 11, 0.14); color: var(--status-warning); }
.whats-new-card__main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.whats-new-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.whats-new-card__type { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.whats-new-card__type--feature { background: rgba(25, 33, 59, 0.08); color: var(--am-blue, #19213b); }
.whats-new-card__type--improvement { background: rgba(14, 165, 233, 0.12); color: var(--status-info); }
.whats-new-card__type--fix { background: rgba(245, 158, 11, 0.14); color: var(--status-warning); }
.whats-new-card__module { font-size: 12px; font-weight: 600; color: var(--text-primary, #101828); }
.whats-new-card__removed { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--status-danger-tint, rgba(217, 45, 32, 0.1)); color: var(--status-danger); }
.whats-new-card__date { margin-left: auto; font-size: 11.5px; color: var(--text-muted, #667085); }
.whats-new-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--am-blue, #19213b); }
.whats-new-card__title { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--text-primary, #101828); overflow-wrap: anywhere; }
.whats-new-card__body { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary, #344054); overflow-wrap: anywhere; }
.whats-new-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border-subtle, #e4e7ec); }
.whats-new-card__action { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px; background: var(--surface-panel, #fff); font: inherit; font-size: 12px; font-weight: 600; color: var(--text-primary, #101828); cursor: pointer; transition: border-color 0.3s ease, background-color 0.3s ease; }
.whats-new-card__action:hover { border-color: var(--am-blue, #19213b); }
.whats-new-card__action:focus-visible { outline: none; box-shadow: var(--am-focus); }
.whats-new-card__action--danger { color: var(--status-danger); }
.whats-new-card__action--danger:hover { border-color: var(--status-danger); }
.whats-new-card__confirm { margin-top: 4px; padding: 12px; border: 1px solid var(--status-danger); border-radius: 5px; background: var(--surface-panel, #fff); }
.whats-new-card__confirm p { margin: 0 0 10px; font-size: 13px; color: var(--text-primary, #101828); }
.whats-new-card__confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.whats-new-card__edit { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.whats-new-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--text-muted, #667085); }

/* ---- Item panel tabs and the Testing, Logs and History panes ----------------- */
/* The AM record tabs (records.css): underline, text only. */
.record-tabs.rm-tabs { margin: 0 0 14px; padding: 0 var(--gutter-tight); }
.rm-pane { display: flex; flex-direction: column; gap: 4px; }
.rm-pane[hidden] { display: none; }
.rm-pane__loading { padding: 18px 0; }
.rm-stage-hint { margin: 10px 0 0; }
.rm-count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; align-items: center; justify-content: center; border-radius: 10px; background: var(--status-neutral-tint, #f2f4f7); color: var(--status-neutral, #475467); font-size: 11.5px; font-weight: 600; }

.rm-test-banner { display: flex; align-items: center; gap: 10px; border-radius: 5px; margin: 8px 0 4px; }
.rm-test-banner .button { margin-left: auto; flex: none; }

.rm-tests { list-style: none; margin: 12px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* RM-007: where a test runs. The pill sits before the result chips; it is a
   button while the line has no results, plain text after. */
.rm-where { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; border: 1px solid var(--border-subtle, #e8ebed); background: var(--surface-panel, #fff); font: inherit; font-size: 11px; font-weight: 600; color: var(--text-secondary, #43484f); white-space: nowrap; }
.rm-where--console { border-color: rgba(109, 92, 255, 0.35); background: var(--accent-tint, #f0edff); color: var(--accent, #6d5cff); }
.rm-where--switch { cursor: pointer; }
.rm-where--switch:hover, .rm-where--switch:focus-visible { border-color: var(--accent, #6d5cff); outline: none; }
.rm-where--switch:disabled { opacity: 0.6; cursor: default; }
.rm-adder { display: flex; align-items: center; gap: 10px; }
.rm-adder .rm-checklist__input { flex: 1 1 auto; min-width: 0; }
.rm-adder .rm-where-toggle { flex: none; margin: 0; padding: 0; border-bottom: 0; overflow: visible; gap: 4px; }
.rm-where-toggle .record-tab { display: inline-flex; align-items: center; height: var(--control-height, 36px); padding: 0 12px; margin: 0; border-radius: 5px; border: 1px solid var(--border-subtle, #e8ebed); color: var(--text-secondary, #43484f); }
.rm-where-toggle .record-tab--active { background: var(--accent-tint, #f0edff); border-color: var(--accent, #6d5cff); color: var(--accent, #6d5cff); font-weight: 600; }
@media (max-width: 560px) {
    .rm-adder { flex-wrap: wrap; }
    .rm-adder .rm-where-toggle { flex: 1 1 100%; }
    .rm-where-toggle .record-tab { flex: 1 1 0; justify-content: center; }
}
.rm-test { border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px; padding: 10px 12px; }
.rm-test__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rm-test__text { flex: 1 1 200px; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }

.rm-result {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px;
    border: 1px solid transparent; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.rm-result:disabled { cursor: default; }
.rm-result__target { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; opacity: 0.75; }
.rm-result--none { background: var(--surface-subtle, #f8f9fb); border-color: var(--border-subtle, #e4e7ec); color: var(--text-muted, #667085); }
.rm-result--good { background: var(--status-success-tint, #ecfdf3); color: var(--status-success, #067647); }
.rm-result--bad { background: var(--status-danger-tint, #fef3f2); color: var(--status-danger, #d92d20); }
.rm-result--neutral { background: var(--status-neutral-tint, #f2f4f7); color: var(--status-neutral, #475467); }
.rm-result--small { padding: 1px 6px; font-size: 11px; }
button.rm-result:not(:disabled):hover { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }

.rm-recorder { margin-top: 10px; padding: 12px; border-radius: 5px; background: var(--surface-subtle, #f8f9fb); display: flex; flex-direction: column; gap: 8px; }
.rm-recorder__title { font-size: 12.5px; font-weight: 600; }
.rm-recorder__choices { display: flex; gap: 8px; flex-wrap: wrap; }
.rm-recorder__choice--good { color: var(--status-success, #067647); }
.rm-recorder__choice--bad { color: var(--status-danger, #d92d20); }
.rm-recorder__note { border-radius: 5px; }

.rm-auto { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; margin-top: 10px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px; }
.rm-auto__label { font-weight: 600; font-size: 13.5px; }
.rm-auto__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.rm-issues { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rm-issue { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px; background: var(--surface-panel, #fff); font: inherit; text-align: left; color: inherit; }
.rm-issue--open { cursor: pointer; }
.rm-issue--open:hover { background: var(--surface-hover, #f5f7fa); }
.rm-issue__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rm-issue__title { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.rm-issue__when { white-space: nowrap; }
.rm-logs__empty { margin: 10px 0 0; }

.rm-timeline { list-style: none; margin: 4px 0 0; padding: 0; }
.rm-timeline__item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px dashed var(--border-subtle, #e4e7ec); font-size: 13px; }
.rm-timeline__item:last-child { border-bottom: 0; }
.rm-timeline__icon { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 5px; background: var(--status-neutral-tint, #f2f4f7); color: var(--status-neutral, #475467); }
.rm-timeline__what { overflow-wrap: anywhere; padding-top: 3px; }
.rm-timeline__when { color: var(--text-muted, #667085); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 3px; }

/* ---- In Testing and the release queue ---------------------------------------- */
.rm-ready { margin-left: auto; padding: 2px 8px; border-radius: 4px; background: var(--status-success-tint, #ecfdf3); color: var(--status-success, #067647); font-size: 11px; font-weight: 700; }
.rm-test-card--failing { border-color: rgba(217, 45, 32, 0.35); }
.rm-queue { margin: 8px var(--gutter, 24px) 22px; padding: 16px; border: 1px solid rgba(18, 183, 106, 0.35); border-radius: 5px; background: rgba(18, 183, 106, 0.04); }
.rm-queue__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rm-queue__title { font-weight: 700; font-size: 14px; }
.rm-queue__head .rm-card__muted { margin-left: auto; }
.rm-queue__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }

@media (max-width: 720px) {
    .rm-queue { margin-left: 16px; margin-right: 16px; }
    .rm-timeline__item { grid-template-columns: 28px 1fr; }
    .rm-timeline__when { grid-column: 2; }
}

/* ---- Release to every agency (Shipped page) ----------------------------------- */
.rm-release { margin: 18px var(--gutter, 24px) 22px; padding: 18px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 6px; background: var(--surface-panel, #fff); display: flex; flex-direction: column; gap: 14px; }
.rm-release__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rm-release__icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; background: rgba(99, 102, 241, 0.1); color: var(--am-blue); flex: none; }
.rm-release__heading { min-width: 0; flex: 1 1 220px; }
.rm-release__title { font-size: 15px; font-weight: 700; color: var(--text-primary, #101828); }
.rm-release__sub { font-size: 12.5px; color: var(--text-muted, #667085); margin-top: 2px; }
.rm-release__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.rm-icon-button { padding-left: 10px; padding-right: 10px; }
.rm-release__notice { margin: 0; }
.rm-release__list { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.rm-release__summary { display: flex; flex-direction: column; gap: 10px; }
.rm-release__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rm-stat { padding: 10px 12px; border-radius: 6px; background: var(--surface-subtle, #f8f9fb); border: 1px solid var(--border-subtle, #eaecf0); display: flex; flex-direction: column; gap: 2px; }
.rm-stat__value { font-size: 20px; font-weight: 700; color: var(--text-primary, #101828); font-variant-numeric: tabular-nums; }
.rm-stat__label { font-size: 12px; color: var(--text-muted, #667085); }
.rm-stat--warning { border-color: rgba(247, 144, 9, 0.45); background: rgba(247, 144, 9, 0.06); }
.rm-release__waiting { border-top: 1px solid var(--border-subtle, #eaecf0); padding-top: 14px; }
.rm-release__confirm { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin-top: 4px; }
.rm-release__confirm input { margin-top: 2px; width: 16px; height: 16px; flex: none; }

.rm-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-chip, 4px); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rm-pill--success { background: rgba(18, 183, 106, 0.12); color: var(--status-success); }
.rm-pill--warning { background: rgba(247, 144, 9, 0.14); color: var(--status-warning); }
.rm-pill--danger { background: rgba(240, 68, 56, 0.12); color: var(--status-danger); }
.rm-pill--info { background: rgba(46, 144, 250, 0.12); color: var(--status-info); }
.rm-pill--neutral { background: var(--status-neutral-tint, #f2f4f7); color: var(--status-neutral, #475467); }
.rm-test-card .rm-card__top .rm-pill { margin-left: auto; }

.rm-run { display: flex; flex-direction: column; gap: 10px; }
.rm-run__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; font-size: 13.5px; }
.rm-run__link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--am-blue); text-decoration: none; }
.rm-run__link:hover { text-decoration: underline; }
.rm-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rm-step { display: grid; grid-template-columns: 22px 170px minmax(0, 1fr); align-items: center; gap: 8px; padding: 7px 10px; border-radius: 5px; font-size: 13px; }
.rm-step__icon { display: inline-flex; color: var(--text-muted, #98a2b3); }
.rm-step__label { font-weight: 600; color: var(--text-secondary, #344054); }
.rm-step__detail { color: var(--text-muted, #667085); font-size: 12.5px; overflow-wrap: anywhere; }
.rm-step--done .rm-step__icon { color: var(--status-success); }
.rm-step--failed { background: rgba(240, 68, 56, 0.06); }
.rm-step--failed .rm-step__icon { color: var(--status-danger); }
.rm-step--running { background: rgba(99, 102, 241, 0.06); }
.rm-step--running .rm-step__icon { color: var(--am-blue); animation: rm-spin 1s linear infinite; }
.rm-step--pending .rm-step__label, .rm-step--notrun .rm-step__label, .rm-step--skipped .rm-step__label { color: var(--text-muted, #98a2b3); font-weight: 500; }
@keyframes rm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rm-step--running .rm-step__icon { animation: none; } }

.rm-commits, .rm-migs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rm-commit { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.rm-commit__message { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-mig { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.rm-mig > span:first-child { min-width: 0; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 720px) {
    .rm-release { margin-left: 16px; margin-right: 16px; padding: 14px; }
    .rm-release__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rm-step { grid-template-columns: 22px minmax(0, 1fr); }
    .rm-step__detail { grid-column: 2; }
    .rm-commit { grid-template-columns: auto minmax(0, 1fr); }
    .rm-commit .rm-card__muted { display: none; }
}

/* ---- Item IDs (RM-012) and the Shipped page in two columns ------------------- */
.rm-ref { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; background: var(--am-blue-tint); color: var(--am-blue-hover); font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.rm-idline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; font-size: 12.5px; }
.rm-code--link { color: var(--am-blue-hover); text-decoration: none; }
.rm-code--link:hover { text-decoration: underline; }
.rm-commit__message .rm-ref { margin-right: 6px; }
.rm-table__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; }

.rm-shipped-layout { display: flex; flex-direction: column; gap: 16px; padding: 18px var(--gutter, 24px) 28px; }
.rm-shipped-main { min-width: 0; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 6px; background: var(--surface-panel, #fff); overflow: hidden; }
.rm-shipped-main__head { display: flex; align-items: center; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle, #eaecf0); }
.rm-shipped-main .rm-table-wrap { padding: 0; }
.rm-shipped-main .state-message { padding: 40px 16px; }
.rm-shipped-side { min-width: 0; }
.rm-shipped-side .rm-release { margin: 0; }

@media (max-width: 720px) {
    .rm-shipped-layout { padding-left: 16px; padding-right: 16px; }
}

/* ---- The Releases table ------------------------------------------------------- */
.rm-shipped-main__head .rm-switch--small { margin: 0 0 0 auto; font-size: 12.5px; font-weight: 500; color: var(--text-secondary, #475467); }
.rm-shipped-main__head .rm-switch--small input { width: 14px; height: 14px; }
.rm-releases-table__when { white-space: nowrap; }
.rm-shipped-items { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rm-shipped-item { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 3px 6px 3px 3px; margin: 0 0 0 -3px; border: 0; border-radius: 5px; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-primary, #101828); text-align: left; cursor: pointer; }
.rm-shipped-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-shipped-item:hover, .rm-shipped-item:focus-visible { background: rgba(99, 102, 241, 0.08); outline: none; }
.rm-run__items { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--border-subtle, #eaecf0); border-radius: 6px; }
.rm-run__items-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted, #667085); }

/* The shared phone rule hides every table's 1st, 3rd and 6th column. Here the
   3rd is what shipped, the point of the table, so this one chooses its own:
   release ID, what shipped and result stay on a phone. */
@media (max-width: 560px) {
    .data-table.rm-releases-table thead th:nth-child(3),
    .data-table.rm-releases-table tbody td:nth-child(3) { display: table-cell; }
    .data-table.rm-releases-table thead th:nth-child(5),
    .data-table.rm-releases-table tbody td:nth-child(5) { display: none; }
    .rm-shipped-main__head { flex-wrap: wrap; }
    .rm-shipped-main__head .rm-switch--small { margin-left: 0; flex-basis: 100%; }
}

/* ---- Waves (RM-078) ------------------------------------------------------------ */
.rm-wave {
    display: flex; flex-direction: column; gap: 10px;
    padding: 12px 12px 10px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-left: 3px solid var(--am-blue);
    border-radius: 5px;
    background: var(--surface-panel, #fff);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    cursor: grab;
}
.rm-wave--complete { border-color: rgba(18, 183, 106, 0.35); border-left-color: var(--status-success); }
.rm-wave--dragging { opacity: 0.4; cursor: grabbing; }
.rm-wave--over { background: rgba(99, 102, 241, 0.05); outline: 1px dashed rgba(99, 102, 241, 0.45); }
.rm-wave__head { display: flex; align-items: center; gap: 8px; }
.rm-wave__open {
    display: inline-flex; align-items: center; gap: 7px; min-width: 0; flex: 1;
    padding: 0; border: 0; background: transparent; font: inherit; color: var(--text-primary, #101828); cursor: pointer; text-align: left;
}
.rm-wave__open .icon { color: var(--am-blue); flex: none; }
.rm-wave__open:hover .rm-wave__name { text-decoration: underline; }
.rm-wave__open:focus-visible { outline: 2px solid var(--am-blue); outline-offset: 2px; border-radius: 4px; }
.rm-wave__name { font-weight: 700; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.rm-wave__count {
    flex: none; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
    background: rgba(99, 102, 241, 0.1); color: var(--am-blue);
}
.rm-wave__done {
    flex: none; padding: 1px 8px; border-radius: 4px; font-size: 11px; font-weight: 700;
    background: var(--status-success-tint, #ecfdf3); color: var(--status-success, #067647);
}
.rm-wave__goal { margin: -4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-muted, #667085); }
.rm-wave .rm-progress__fill { background: var(--am-blue); }
.rm-wave--complete .rm-progress__fill { background: var(--status-success, #12b76a); }

.rm-wave__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-height: 8px; }
.rm-wave__row {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    padding: 7px 8px; border: 1px solid var(--border-subtle, #eaecf0); border-radius: 5px;
    background: var(--surface-subtle, #f9fafb); cursor: pointer;
}
.rm-wave__row[draggable="true"] { cursor: grab; }
.rm-wave__row:hover { background: var(--surface-panel, #fff); border-color: var(--border-default, #d0d5dd); }
.rm-wave__row:focus-visible { outline: 2px solid var(--am-blue); outline-offset: 1px; }
.rm-wave__row--dragging { opacity: 0.4; }
.rm-wave__row--shipped .rm-wave__title { color: var(--text-muted, #667085); text-decoration: line-through; }
.rm-wave__title { flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary, #101828); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-wave__empty { padding: 12px 8px; text-align: center; font-size: 12.5px; color: var(--text-muted, #667085); border: 1px dashed var(--border-subtle, #d0d5dd); border-radius: 5px; }

.rm-wave__stage { flex: none; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.rm-wave__stage--planned { background: var(--status-neutral-tint, #f2f4f7); color: var(--status-neutral, #475467); }
.rm-wave__stage--testing { background: var(--status-warning-tint, #fffaeb); color: var(--status-warning, #b26a00); }
.rm-wave__stage--ready { background: var(--status-info-tint, #eff4ff); color: var(--status-info, #1e70ff); }
.rm-wave__stage--shipped { background: var(--status-success-tint, #ecfdf3); color: var(--status-success, #067647); }

.rm-wave-button { color: var(--am-blue); font-weight: 600; }
.rm-wave-button .icon { color: var(--am-blue); }

/* Wave panel */
.rm-wave-panel__goal { resize: vertical; min-height: 56px; font: inherit; }
.rm-wave-panel__members,
.rm-wave-panel__picker { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rm-wave-panel__picker { max-height: 320px; overflow-y: auto; margin-top: 8px; }
.rm-wave-panel__member,
.rm-wave-panel__option {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    padding: 8px 10px; border: 1px solid var(--border-subtle, #e4e7ec); border-radius: 5px;
}
.rm-wave-panel__option { cursor: pointer; }
.rm-wave-panel__option .icon:first-child { color: var(--am-blue); flex: none; }
.rm-wave-panel__option:hover,
.rm-wave-panel__option:focus-visible { background: rgba(99, 102, 241, 0.06); border-color: rgba(99, 102, 241, 0.4); outline: none; }
.rm-wave-panel__search { margin-top: 14px; width: 100%; }
.rm-wave-panel__none { padding: 6px 2px; }

@media (max-width: 560px) {
    .rm-wave__stage { display: none; }
    .rm-wave-panel__option .rm-card__muted { display: none; }
}
