/* ═══════════════════════════════════════════════════════════
   Roadmap shell and shared components.
   Light only. Semantic --rm-* tokens sit over the template's --app-*
   tokens; inside .rm-shell the neutral surfaces are re-pointed to a
   calmer, warmer grey so the pages read as a public site rather than
   an admin console. Brand hues (--app-navy*, --app-teal*) stay owned
   by branding.js so admin-chosen colours flow through.
   ═══════════════════════════════════════════════════════════ */

:root {
  --rm-font-ui: 'Outfit', system-ui, -apple-system, sans-serif;
  --rm-font-display: var(--rm-font-ui);

  --rm-ink: var(--app-navy);
  --rm-accent: var(--app-teal);
  --rm-accent-rgb: var(--app-teal-rgb);
  --rm-accent-deep: var(--app-teal-600);
  --rm-link: color-mix(in oklab, var(--app-teal-600) 78%, black);
  --rm-primary: var(--app-navy);
  --rm-primary-hover: var(--app-navy-600);
  --rm-on-primary: #ffffff;
  --rm-focus: rgba(var(--rm-accent-rgb), 0.5);

  /* Request status */
  --rm-status-new: #6F7F9C;      --rm-status-new-soft: #EEF1F6;
  --rm-status-review: #6B5FD0;   --rm-status-review-soft: #EFEDFB;
  --rm-status-planned: #2B6FCB;  --rm-status-planned-soft: #E9F1FC;
  --rm-status-progress: #B7700A; --rm-status-progress-soft: #FBF1E0;
  --rm-status-shipped: var(--app-teal-600); --rm-status-shipped-soft: rgba(var(--app-teal-rgb), .13);
  --rm-status-declined: #7F8CA3; --rm-status-declined-soft: #EEF1F6;

  /* Request type */
  --rm-type-bug: #C63D37;  --rm-type-bug-soft: #FBEAE9;
  --rm-type-enh: #3A5FD0;  --rm-type-enh-soft: #EAEFFB;

  /* Solution lifecycle */
  --rm-sol-active: var(--app-teal-600);
  --rm-sol-beta: #8347BD;
  --rm-sol-planned: #2B6FCB;
  --rm-sol-sunset: #A8701A;
  --rm-sol-retired: #7F8CA3;

  --rm-max: 1180px;
  --rm-bar-h: 64px;
  --rm-r-card: 12px;
  --rm-r-pill: 999px;
  --rm-lane-w: 320px;
  --rm-ease: var(--app-ease);
  --rm-fast: var(--app-fast);
  --rm-mid: var(--app-mid);
  --rm-slow: var(--app-slow);
}

/* ── Shell ───────────────────────────────────────────────────── */
.rm-shell {
  --app-bg: #F6F7F9;
  --app-surface-2: #EEF1F5;
  --app-border: #E2E6EC;
  --app-border-2: #CBD3DE;
  --app-text-2: #4B5A75;
  --app-text-3: #74829A;
  --app-shadow-xs: 0 1px 2px rgba(13,36,71,.04);
  --app-shadow-sm: 0 2px 6px rgba(13,36,71,.06);
  --app-shadow: 0 6px 18px rgba(13,36,71,.08);

  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--app-bg); color: var(--app-text); font-family: var(--rm-font-ui);
}
.rm-shell h1, .rm-shell h2, .rm-shell h3, .rm-shell h4, .rm-shell h5, .rm-shell h6 { font-family: var(--rm-font-ui); }
.rm-shell a { color: var(--rm-link); }
.rm-shell a:hover { color: var(--rm-ink); }

/* ── Top bar ─────────────────────────────────────────────────── */
.rm-topbar { position: sticky; top: 0; z-index: 1030; background: var(--app-white); border-bottom: 1px solid var(--app-border); }
.rm-topbar__inner { max-width: var(--rm-max); margin: 0 auto; padding: 0 1.5rem; height: var(--rm-bar-h); display: flex; align-items: center; gap: 1.25rem; }
.rm-brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--rm-ink) !important; flex-shrink: 0; }
.rm-brand__logo { height: 30px; width: auto; }
.rm-brand__name { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.rm-nav { display: flex; align-self: stretch; gap: 0.1rem; margin-left: 0.5rem; }
.rm-nav a {
  display: inline-flex; align-items: center; padding: 0 0.9rem; text-decoration: none;
  font-size: 0.95rem; font-weight: 500; color: var(--app-text-2) !important;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
  transition: color var(--rm-fast) ease, border-color var(--rm-fast) ease;
}
.rm-nav a:hover { color: var(--rm-ink) !important; }
.rm-nav a.active { color: var(--rm-ink) !important; font-weight: 600; border-bottom-color: var(--rm-accent-deep); }
.rm-nav a:focus-visible { outline: 2px solid var(--rm-focus); outline-offset: -4px; }
.rm-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.rm-topbar__menu { display: none; border: 1px solid var(--app-border); background: var(--app-white); color: var(--rm-ink); width: 40px; height: 40px; border-radius: 8px; font-size: 1.25rem; margin-left: auto; }
@media (max-width: 899.98px) {
  .rm-topbar__inner { gap: 0.75rem; }
  .rm-topbar__menu { display: inline-grid; place-items: center; }
  .rm-topbar__actions { margin-left: 0; }
  .rm-topbar__cta span { display: none; }
  .rm-topbar__cta { padding: 0.45rem 0.6rem; }
  .rm-nav { display: none; position: absolute; left: 0; right: 0; top: var(--rm-bar-h); flex-direction: column; background: var(--app-white); border-bottom: 1px solid var(--app-border); box-shadow: var(--app-shadow); padding: 0.5rem 0; margin: 0; }
  .rm-nav--open { display: flex; }
  .rm-nav a { padding: 0.8rem 1.5rem; border: 0; border-left: 3px solid transparent; min-height: 48px; }
  .rm-nav a.active { border-left-color: var(--rm-accent-deep); background: var(--app-bg); }
  .rm-topbar .user-display-name, .rm-topbar .user-caret { display: none; }
}

.rm-alpha { text-align: center; font-size: 0.78rem; padding: 0.3rem 1rem; background: #FFF4DA; color: #7A4B00; border-bottom: 1px solid #F3DFAE; }
.rm-alpha__badge { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.05rem 0.45rem; border-radius: 4px; background: #F5D98A; margin-right: 0.35rem; }

.rm-main { flex: 1; width: 100%; max-width: var(--rm-max); margin: 0 auto; padding: 2rem 1.5rem 3.5rem; }
@media (max-width: 640.98px) { .rm-main { padding: 1.25rem 1rem 2.5rem; } }

.rm-footer { border-top: 1px solid var(--app-border); background: var(--app-white); }
.rm-footer { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; padding: 1.1rem 1.5rem; font-size: 0.82rem; color: var(--app-text-3); }
.rm-footer a { color: var(--app-text-2); text-decoration: none; }
.rm-footer a:hover { color: var(--rm-ink); text-decoration: underline; }
.rm-footer span { font-weight: 600; color: var(--app-text-2); }

/* ── Hero ─────────────────────────────────────────────────────── */
.rm-hero { max-width: 60rem; margin: 0 0 1.5rem; }
.rm-hero__title {
  font-family: var(--rm-font-ui); font-weight: 600;
  font-size: clamp(1.7rem, 1.25rem + 1.5vw, 2.35rem); line-height: 1.15; letter-spacing: -0.02em;
  color: var(--rm-ink); margin: 0 0 0.5rem;
}
.rm-hero__lede { font-size: 1.05rem; color: var(--app-text-2); max-width: 44rem; margin: 0; line-height: 1.55; }
.rm-hero__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 0.9rem; font-size: 0.9rem; color: var(--app-text-2); }
.rm-hero__meta strong { color: var(--rm-ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── Filters ─────────────────────────────────────────────────── */
.rm-filterbar { background: var(--app-white); border: 1px solid var(--app-border); border-radius: var(--rm-r-card); padding: 1rem 1.15rem; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.rm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1.25rem; }
.rm-filterbar .rm-filters { margin-bottom: 0; }
.rm-search { position: relative; flex: 1 1 16rem; max-width: 26rem; }
.rm-search--lg { max-width: none; flex-basis: 100%; }
.rm-search input {
  width: 100%; padding: 0.6rem 0.9rem 0.6rem 2.5rem; font-size: 0.95rem;
  border: 1px solid var(--app-border-2); border-radius: 8px;
  background: var(--app-white); color: var(--app-text);
  transition: border-color var(--rm-fast) ease, box-shadow var(--rm-fast) ease;
}
.rm-search--lg input { padding: 0.8rem 1rem 0.8rem 2.8rem; font-size: 1.02rem; }
.rm-search input:focus { outline: none; border-color: var(--rm-accent-deep); box-shadow: 0 0 0 3px var(--rm-focus); }
.rm-search i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--app-text-3); pointer-events: none; }
.rm-search--lg i { left: 1.05rem; font-size: 1.05rem; }
.rm-filters .rm-spacer { flex: 1; }

.rm-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rm-chip-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; min-height: 36px;
  border: 1px solid var(--app-border); border-radius: var(--rm-r-pill); background: var(--app-white);
  font: inherit; font-size: 0.85rem; font-weight: 500; color: var(--app-text-2); cursor: pointer;
  transition: border-color var(--rm-fast) ease, background-color var(--rm-fast) ease, color var(--rm-fast) ease;
}
.rm-chip-btn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color, var(--app-border-2)); }
.rm-chip-btn--all::before { display: none; }
.rm-chip-btn:hover { border-color: var(--app-border-2); color: var(--rm-ink); }
.rm-chip-btn[aria-pressed="true"] { border-color: var(--chip-color, var(--rm-ink)); background: color-mix(in oklab, var(--chip-color, var(--rm-ink)) 10%, var(--app-white)); color: var(--rm-ink); font-weight: 600; }
.rm-chip-btn:focus-visible { outline: 2px solid var(--rm-focus); outline-offset: 2px; }

.rm-result-line { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; color: var(--app-text-2); margin: 0 0 0.75rem; }
.rm-result-line strong { color: var(--rm-ink); font-variant-numeric: tabular-nums; }

/* ── Pills ───────────────────────────────────────────────────── */
.rm-pill {
  display: inline-flex; align-items: center; gap: 0.38rem;
  padding: 0.22rem 0.65rem; border-radius: var(--rm-r-pill);
  font-size: 0.76rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
  color: var(--pill-fg, var(--app-text-2)); background: var(--pill-bg, var(--app-surface-2));
}
.rm-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rm-pill--plain::before { display: none; }
.rm-pill--sol-Active  { --pill-fg: var(--rm-sol-active);  --pill-bg: rgba(var(--app-teal-rgb), .13); }
.rm-pill--sol-Beta    { --pill-fg: var(--rm-sol-beta);    --pill-bg: #F1E9F9; }
.rm-pill--sol-Planned { --pill-fg: var(--rm-sol-planned); --pill-bg: #E9F1FC; }
.rm-pill--sol-Sunset  { --pill-fg: var(--rm-sol-sunset);  --pill-bg: #FBF1E0; }
.rm-pill--sol-Retired { --pill-fg: var(--rm-sol-retired); --pill-bg: #EEF1F6; }
.rm-pill--status-New         { --pill-fg: var(--rm-status-new);      --pill-bg: var(--rm-status-new-soft); }
.rm-pill--status-UnderReview { --pill-fg: var(--rm-status-review);   --pill-bg: var(--rm-status-review-soft); }
.rm-pill--status-Planned     { --pill-fg: var(--rm-status-planned);  --pill-bg: var(--rm-status-planned-soft); }
.rm-pill--status-InProgress  { --pill-fg: var(--rm-status-progress); --pill-bg: var(--rm-status-progress-soft); }
.rm-pill--status-Shipped     { --pill-fg: var(--rm-status-shipped);  --pill-bg: var(--rm-status-shipped-soft); }
.rm-pill--status-Declined,
.rm-pill--status-Duplicate   { --pill-fg: var(--rm-status-declined); --pill-bg: var(--rm-status-declined-soft); }
.rm-pill--type-Bug         { --pill-fg: var(--rm-type-bug); --pill-bg: var(--rm-type-bug-soft); }
.rm-pill--type-Enhancement { --pill-fg: var(--rm-type-enh); --pill-bg: var(--rm-type-enh-soft); }

/* Version chips: environment + version, tabular */
.rm-version { display: inline-flex; align-items: stretch; border-radius: 6px; overflow: hidden; border: 1px solid var(--app-border); font-size: 0.72rem; line-height: 1; }
.rm-version__env { padding: 0.32rem 0.45rem; background: var(--app-surface-2); color: var(--app-text-2); font-weight: 600; }
.rm-version__num { padding: 0.32rem 0.5rem; background: var(--app-white); color: var(--rm-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.rm-version--prod .rm-version__env { background: var(--rm-primary); color: var(--rm-on-primary); }
.rm-version--empty .rm-version__num { color: var(--app-text-3); font-weight: 500; }

/* ── Grid + cards ────────────────────────────────────────────── */
.rm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }

.rm-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--app-white); border: 1px solid var(--app-border);
  border-radius: var(--rm-r-card);
  text-decoration: none; color: inherit;
  transition: border-color var(--rm-fast) ease, box-shadow var(--rm-fast) ease;
}
a.rm-card:hover, a.rm-card:focus-visible { border-color: var(--app-border-2); box-shadow: var(--app-shadow-sm); color: inherit; }
a.rm-card:focus-visible { outline: 2px solid var(--rm-focus); outline-offset: 2px; }

.rm-card--solution { padding: 1.15rem 1.15rem 0.9rem 1.35rem; overflow: hidden; }
.rm-card--solution::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sol-color, var(--rm-accent)); }
.rm-card__head { display: flex; align-items: flex-start; gap: 0.85rem; margin-bottom: 0.65rem; }
.rm-card__title { font-size: 1.06rem; font-weight: 600; color: var(--rm-ink); line-height: 1.25; margin: 0; }
.rm-card__desc { font-size: 0.9rem; color: var(--app-text-2); line-height: 1.5; margin: 0 0 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-card__versions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.rm-card__stats {
  margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--app-border);
  display: grid; grid-template-columns: auto auto 1fr; gap: 0.6rem 1rem; align-items: center;
  font-size: 0.8rem; color: var(--app-text-2);
}
.rm-card__stat strong { display: block; font-size: 1.05rem; font-weight: 600; color: var(--rm-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.rm-card__stat--bugs strong { color: var(--rm-type-bug); }
.rm-card__top { min-width: 0; font-size: 0.8rem; color: var(--app-text-2); }
.rm-card__top span { display: block; color: var(--rm-ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-card__top small { color: var(--app-text-3); }

.rm-sol-icon {
  flex-shrink: 0; display: grid; place-items: center;
  width: var(--sol-size, 42px); height: var(--sol-size, 42px); border-radius: 10px;
  background: color-mix(in oklab, var(--sol-color, var(--rm-accent)) 13%, var(--app-white));
  color: var(--sol-color, var(--rm-accent)); font-size: calc(var(--sol-size, 42px) * 0.5);
}
.rm-sol-icon--lg { --sol-size: 64px; border-radius: 16px; }

/* ── Request rows (list view) ────────────────────────────────── */
.rm-list { display: flex; flex-direction: column; gap: 0.6rem; }
.rm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem 1.25rem; align-items: center; padding: 1rem 1.15rem; cursor: pointer; }
.rm-row__main { min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.rm-row__top { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; color: var(--app-text-3); }
.rm-row__key { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--app-text-3); }
.rm-row__sol { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--app-text-2); font-weight: 500; }
.rm-row__sol i { color: var(--sol-color, var(--rm-accent)); }
.rm-row__title { font-size: 1.05rem; font-weight: 600; color: var(--rm-ink); line-height: 1.35; margin: 0; }
.rm-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1rem; font-size: 0.82rem; color: var(--app-text-3); }
.rm-row__meta i { margin-right: 0.25rem; }
.rm-row__side { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.rm-row__when { font-size: 0.8rem; font-weight: 600; color: var(--rm-status-planned); white-space: nowrap; }
@media (max-width: 640.98px) {
  .rm-row { grid-template-columns: 1fr; }
  .rm-row__side { justify-content: space-between; }
}

/* Recently shipped strip */
.rm-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.8rem 1.15rem; margin-bottom: 1.25rem; background: var(--app-white); border: 1px solid var(--app-border); border-radius: var(--rm-r-card); font-size: 0.86rem; }
.rm-recent__label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--rm-ink); }
.rm-recent__label i { color: var(--rm-accent-deep); }
.rm-recent__item { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; color: var(--app-text-2); min-width: 0; max-width: 100%; }
.rm-recent__item strong { color: var(--rm-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rm-recent__item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; }
.rm-recent__item small { color: var(--app-text-3); white-space: nowrap; }
.rm-recent__item:hover strong { text-decoration: underline; }
.rm-recent__all { margin-left: auto; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ── Detail hero ─────────────────────────────────────────────── */
.rm-detail-hero { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.5rem; }
.rm-detail-hero__body { flex: 1 1 24rem; min-width: 0; }
.rm-detail-hero__title { font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.15; color: var(--rm-ink); margin: 0 0 0.35rem; }
.rm-detail-hero__desc { font-size: 1rem; color: var(--app-text-2); margin: 0 0 0.9rem; max-width: 48rem; }
.rm-detail-hero__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.rm-detail-hero__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-self: flex-start; }
.rm-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rm-link {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem;
  border: 1px solid var(--app-border); border-radius: 6px; background: var(--app-white);
  font-size: 0.8rem; font-weight: 500; color: var(--rm-ink) !important; text-decoration: none;
  transition: border-color var(--rm-fast) ease;
}
.rm-link:hover { border-color: var(--rm-accent-deep); }
.rm-owners { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--app-text-2); flex-wrap: wrap; }
.rm-avatar {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--app-surface-2); color: var(--rm-ink); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em;
}

/* ── Tabs / segmented ────────────────────────────────────────── */
.rm-tabs { display: flex; gap: 0.15rem; padding: 3px; background: var(--app-surface-2); border-radius: 10px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 1.25rem; }
.rm-tabs::-webkit-scrollbar { display: none; }
.rm-tab {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 1rem; border: 0; background: none;
  border-radius: 8px; font: inherit; font-size: 0.86rem; font-weight: 500; color: var(--app-text-2);
  white-space: nowrap; cursor: pointer; transition: color var(--rm-fast) ease, background-color var(--rm-fast) ease;
}
.rm-tab:hover { color: var(--rm-ink); }
.rm-tab.active { background: var(--app-white); color: var(--rm-ink); font-weight: 600; box-shadow: var(--app-shadow-xs); }
.rm-tab:focus-visible { outline: 2px solid var(--rm-focus); outline-offset: -2px; }
.rm-tab__count { font-size: 0.7rem; padding: 0.05rem 0.4rem; border-radius: var(--rm-r-pill); background: var(--app-surface-2); color: var(--app-text-2); font-variant-numeric: tabular-nums; }
.rm-tab.active .rm-tab__count { background: var(--app-teal-50); color: var(--rm-accent-deep); }

.rm-segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--app-surface-2); border-radius: 10px; }
.rm-segmented button {
  border: 0; background: none; font: inherit; font-size: 0.84rem; font-weight: 500; color: var(--app-text-2);
  padding: 0.4rem 0.85rem; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.35rem; transition: color var(--rm-fast) ease, background-color var(--rm-fast) ease;
}
.rm-segmented button[aria-pressed="true"] { background: var(--app-white); color: var(--rm-ink); font-weight: 600; box-shadow: var(--app-shadow-xs); }
.rm-segmented button:focus-visible { outline: 2px solid var(--rm-focus); outline-offset: -2px; }

/* ── Empty / skeleton ────────────────────────────────────────── */
.rm-empty { text-align: center; padding: 3rem 1rem; max-width: 34rem; margin: 1rem auto; }
.rm-empty__icon { font-size: 2rem; color: var(--app-text-3); margin-bottom: 0.5rem; }
.rm-empty__title { font-weight: 600; font-size: 1.35rem; color: var(--rm-ink); margin: 0 0 0.35rem; letter-spacing: -0.01em; }
.rm-empty__msg { color: var(--app-text-2); margin: 0 0 1rem; font-size: 0.95rem; }

.rm-skel { border-radius: var(--rm-r-card); background: var(--app-white); border: 1px solid var(--app-border); padding: 1.15rem; min-height: 190px; }
.rm-skel .crm-skel { display: block; border-radius: 6px; margin-bottom: 0.7rem; }

/* ── Section blocks / prose ──────────────────────────────────── */
.rm-section { margin-bottom: 2rem; }
.rm-section__title { font-size: 1rem; font-weight: 600; color: var(--rm-ink); margin: 0 0 0.75rem; }
.rm-prose { max-width: 46rem; font-size: 0.97rem; line-height: 1.65; color: var(--app-text); }
.rm-prose h2, .rm-prose h3, .rm-prose h4 { font-weight: 600; margin: 1.2rem 0 0.4rem; }
.rm-prose p { margin: 0 0 0.75rem; }
.rm-prose img { max-width: 100%; border-radius: 8px; }
.rm-prose blockquote { border-left: 3px solid var(--rm-accent-deep); margin: 0.75rem 0; padding: 0.25rem 0 0.25rem 0.9rem; color: var(--app-text-2); }
.rm-prose pre { background: var(--app-surface-2); padding: 0.75rem; border-radius: 6px; overflow-x: auto; font-size: 0.85rem; }
.rm-prose code { background: var(--app-surface-2); padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.85em; }

.rm-panel { background: var(--app-white); border: 1px solid var(--app-border); border-radius: var(--rm-r-card); padding: 1.15rem 1.25rem; }
.rm-kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1rem; font-size: 0.88rem; }
.rm-kv dt { color: var(--app-text-3); font-weight: 500; margin: 0; }
.rm-kv dd { margin: 0; color: var(--app-text); }

/* ── Deployment table ────────────────────────────────────────── */
.rm-deploy { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.rm-deploy th { text-align: left; font-weight: 500; color: var(--app-text-3); padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--app-border); }
.rm-deploy td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--app-border); color: var(--app-text); vertical-align: middle; }
.rm-deploy tr:last-child td { border-bottom: 0; }
.rm-deploy .rm-mono { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--rm-ink); }

/* ── Buttons (never inherit the template's .btn shimmer) ─────── */
.rm-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.58rem 1.05rem;
  border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background-color var(--rm-fast) ease, border-color var(--rm-fast) ease, color var(--rm-fast) ease;
}
.rm-btn:focus-visible { outline: 2px solid var(--rm-focus); outline-offset: 2px; }
.rm-btn:disabled { opacity: .55; cursor: not-allowed; }
.rm-btn--primary, .rm-btn--accent { background: var(--rm-primary); color: var(--rm-on-primary) !important; }
.rm-btn--primary:hover:not(:disabled), .rm-btn--accent:hover:not(:disabled) { background: var(--rm-primary-hover); }
.rm-btn--ghost { background: var(--app-white); color: var(--rm-ink) !important; border-color: var(--app-border-2); }
.rm-btn--ghost:hover:not(:disabled) { background: var(--app-surface-2); }
.rm-btn--quiet { background: transparent; color: var(--app-text-2) !important; padding: 0.4rem 0.6rem; font-weight: 500; }
.rm-btn--quiet:hover:not(:disabled) { color: var(--rm-ink) !important; background: var(--app-surface-2); }
.rm-btn--sm { padding: 0.42rem 0.8rem; font-size: 0.82rem; }
.rm-btn--on { border-color: var(--rm-accent-deep); color: var(--rm-accent-deep) !important; background: var(--app-teal-50); }

/* ── Toasts ──────────────────────────────────────────────────── */
.rm-toaster { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080; display: flex; flex-direction: column; gap: 0.5rem; max-width: min(24rem, calc(100vw - 2rem)); }
.rm-toast {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem;
  background: var(--rm-ink); color: #fff; border-radius: 10px; box-shadow: var(--app-shadow-lg);
  font-size: 0.88rem; animation: rm-toast-in var(--rm-slow) var(--rm-ease) both;
}
.rm-toast a { color: var(--app-teal) !important; font-weight: 600; margin-left: auto; white-space: nowrap; }
.rm-toast--error { background: #7f1d1d; }
.rm-toast i { font-size: 1rem; }
@keyframes rm-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Form layout helpers (editor pages) ──────────────────────── */
.rm-form { max-width: 56rem; }
.rm-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.9rem 1.25rem; }
.rm-form__section { margin-bottom: 1.75rem; }
.rm-form__section h2 { font-size: 1rem; font-weight: 600; color: var(--rm-ink); margin: 0 0 0.75rem; }
.rm-form label { font-size: 0.84rem; font-weight: 500; color: var(--app-text-2); margin-bottom: 0.3rem; display: block; }
.rm-form .rm-help { font-size: 0.78rem; color: var(--app-text-3); margin-top: 0.3rem; }
.rm-form__actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 1.5rem; }
.rm-color-field { display: flex; align-items: center; gap: 0.5rem; }
.rm-color-field input[type="color"] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--app-border); border-radius: 6px; background: var(--app-white); cursor: pointer; }
.rm-owner-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rm-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.28rem 0.4rem 0.28rem 0.65rem;
  border: 1px solid var(--app-border); border-radius: var(--rm-r-pill); font-size: 0.8rem; color: var(--rm-ink); background: var(--app-white);
}
.rm-chip--primary { border-color: var(--rm-accent-deep); }
.rm-chip button { border: 0; background: none; color: var(--app-text-3); cursor: pointer; padding: 0 0.2rem; font-size: 0.85rem; line-height: 1; }
.rm-chip button:hover { color: var(--rm-type-bug); }

.rm-alert { padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.88rem; margin-bottom: 1rem; border: 1px solid transparent; }
.rm-alert--error { background: var(--rm-type-bug-soft); color: var(--rm-type-bug); border-color: #F0C6C3; }
.rm-alert--ok { background: var(--rm-status-shipped-soft); color: var(--rm-status-shipped); }

/* ── Motion guards ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rm-card, .rm-btn, .rm-toast { transition: none !important; animation: none !important; }
}

/* Mobile touch targets */
@media (max-width: 640.98px) {
  .rm-tab, .rm-segmented button, .rm-btn { min-height: 44px; }
  .rm-hero { margin-bottom: 1.25rem; }
  .rm-card__stats { grid-template-columns: auto auto; }
  .rm-card__top { grid-column: 1 / -1; }
}

/* ── Notification preferences (My activity → Notifications) ────── */
.rm-prefs { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--app-border); border-radius: var(--rm-r-card); background: var(--app-white); overflow: hidden; }
.rm-prefs__head { display: grid; grid-template-columns: 1fr repeat(var(--rm-pref-cols, 2), 84px); gap: 0.5rem; padding: 0.6rem 1rem; background: var(--app-surface-2); font-size: 0.74rem; font-weight: 600; color: var(--app-text-2); }
.rm-prefs__head span:not(:first-child) { text-align: center; }
.rm-prefs__row { display: grid; grid-template-columns: 1fr repeat(var(--rm-pref-cols, 2), 84px); gap: 0.5rem; align-items: center; padding: 0.7rem 1rem; border-top: 1px solid var(--app-border); }
.rm-prefs__label { font-size: 0.9rem; font-weight: 600; color: var(--rm-ink); }
.rm-prefs__desc { font-size: 0.78rem; color: var(--app-text-3); }
.rm-prefs__cell { display: flex; justify-content: center; }
.rm-prefs__cell input { width: 18px; height: 18px; accent-color: var(--rm-accent-deep); cursor: pointer; }
.rm-prefs__section { grid-column: 1 / -1; padding: 0.55rem 1rem 0.2rem; font-size: 0.72rem; font-weight: 600; color: var(--app-text-3); border-top: 1px solid var(--app-border); background: var(--app-bg); }
.rm-prefs__foot { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid var(--app-border); }
@media (max-width: 640.98px) {
  .rm-prefs__head, .rm-prefs__row { grid-template-columns: 1fr repeat(var(--rm-pref-cols, 2), 56px); }
}
