/* Non-Escalator Relationship Menu — page-local styles. Loads only on
   /dynamic-menu/, so nothing here leaks site-wide. Uses the site's CSS vars
   (--bg, --fg, --muted, --accent, --rule) so dark mode just works. */

:root {
  --rm-on-accent: #ffffff;
  --rm-page: #FDFCFA;   /* off-white canvas */
  --rm-panel: #EBF2E9;  /* sage — the content column's surface */
}
@media (prefers-color-scheme: dark) {
  :root {
    --rm-on-accent: #16181b;
    --rm-page: #0f1210;
    --rm-panel: #1a231c; /* deep muted sage */
  }
}

/* Sage reading panel: page-local (this stylesheet only loads on /dynamic-menu). */
/* 16px base (down from the site's 17px) — modern floor for body copy; keeps
   inputs at >=16px so iOS doesn't zoom on focus. Everything rem-based scales. */
body { background: var(--rm-page); font-size: 16px; }
/* No site header on this page (Manny 2026-07-27) — the quiz stands alone. */
.site-header { display: none; }
main article {
  background: var(--rm-panel);
  border-radius: 16px;
  padding: 1.5rem 1.75rem 2.5rem;
  margin: .75rem 0 2rem;
}
.rm-lede p { margin: 0 0 1rem; }

/* The builder auto-lists everything in files/ as attachments; this page links
   its own assets deliberately, so hide that block. */
.attachments { display: none; }

/* Hide the template h1/date while inside the app (JS toggles body.rm-app). */
body.rm-app article > h1, body.rm-app .page-date { display: none; }

.rm-screen[hidden] { display: none; }

/* ---------- Landing ---------- */
.rm-lede { font-size: 1.08rem; }
.rm-fig { margin: 1.4rem 0; text-align: center; }
.rm-fig img { background: #fff; border-radius: 8px; padding: .5rem; max-width: 100%; height: auto; }
.rm-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 1rem; justify-content: center; }
.rm-btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none;
  border-radius: 10px; padding: .65rem 1.3rem; min-height: 44px; cursor: pointer;
  border: 1.5px solid var(--accent); text-align: center;
}
.rm-btn-primary { background: var(--accent); color: var(--rm-on-accent); }
.rm-btn-primary:hover { filter: brightness(1.08); }
.rm-btn-secondary { background: transparent; color: var(--accent); }
.rm-btn-secondary:hover { background: rgba(127,127,127,.08); }
.rm-resume { border-left: 3px solid var(--accent); padding: .3rem 1rem; }
.rm-linkbtn {
  font: inherit; background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); text-decoration: underline;
}
.rm-sources { padding-left: 1.2rem; }
.rm-sources li { margin: .35rem 0; }
.rm-note, .rm-beta, .rm-notice { color: var(--muted); font-size: .92rem; }
.rm-beta { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1rem; }

/* ---------- Setup ---------- */
.rm-field { margin: 1.1rem 0; }
.rm-field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.rm-field input[type="text"], .rm-field select {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 1.5px solid var(--rule); border-radius: 8px;
  padding: .55rem .7rem; width: 100%; max-width: 24rem; min-height: 44px;
}
.rm-field input:focus, .rm-field select:focus, .rm-pill:focus, .rm-btn:focus,
.rm-linkbtn:focus, .rm-custom-text:focus, .rm-iconbtn:focus {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.rm-optional { color: var(--muted); font-weight: 400; font-size: .88rem; }
.rm-notice { border-left: 3px solid var(--rule); padding: .3rem 1rem; margin: 1.4rem 0; }

/* ---------- Wizard ---------- */
.rm-whead {
  position: sticky; top: 0; z-index: 5; background: var(--rm-panel);
  padding: .7rem 0 .4rem; border-bottom: 1px solid var(--rule);
}
.rm-banner {
  display: flex; align-items: center; gap: .9rem;
  border-radius: 12px; padding: .85rem 1.1rem; margin-bottom: .6rem;
}
.rm-cat-art { width: 52px; height: 52px; flex-shrink: 0; }
.rm-banner-text h2 { margin: 0; font-size: 1.25rem; }
.rm-cat-intro { font-size: .88rem; margin: .25rem 0 0; line-height: 1.45; }
.rm-step { color: var(--muted); font-size: .88rem; margin: .4rem 0 0; }
.rm-progress { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.rm-progress i { display: block; height: 100%; background: var(--accent); transition: width .25s; }

.rm-item {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center;
  padding: .55rem 0; border-bottom: 1px solid var(--rule);
}
.rm-label { line-height: 1.35; }
.rm-pills { display: flex; gap: .4rem; flex-wrap: nowrap; }
.rm-pill {
  font: inherit; font-size: .88rem; color: var(--muted); background: transparent;
  border: 1.5px solid var(--rule); border-radius: 999px; cursor: pointer;
  min-height: 44px; min-width: 44px; padding: .3rem .75rem; white-space: nowrap;
}
.rm-pill .rm-vs { display: none; }
/* Selected states — distinct by fill, border style, and text treatment, so the
   four values survive greyscale printing and color-blind viewing (spec §8.3). */
.rm-pill[aria-checked="true"].rm-pill-must {
  background: var(--accent); border-color: var(--accent);
  color: var(--rm-on-accent); font-weight: 700;
}
.rm-pill[aria-checked="true"].rm-pill-like {
  border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--accent); font-weight: 700;
}
.rm-pill[aria-checked="true"].rm-pill-maybe {
  border-style: dashed; border-color: var(--accent);
  color: var(--accent); font-weight: 600;
}
.rm-pill[aria-checked="true"].rm-pill-off {
  border-color: var(--fg); color: var(--fg);
  text-decoration: line-through; font-weight: 700;
}

.rm-custom-row .rm-custom-text {
  font: inherit; color: var(--fg); background: var(--bg);
  border: none; border-bottom: 1.5px dashed var(--rule); border-radius: 0;
  padding: .35rem 0; width: 100%; min-height: 40px;
}
.rm-custom-wrap { display: flex; gap: .5rem; align-items: center; }
.rm-iconbtn {
  font: inherit; background: none; border: 1.5px solid var(--rule); color: var(--muted);
  border-radius: 8px; min-width: 36px; min-height: 36px; cursor: pointer;
}
.rm-iconbtn:hover { color: var(--fg); border-color: var(--fg); }
.rm-add { margin: 1rem 0 .3rem; }
.rm-custom-notice { margin-top: .4rem; }

.rm-wfoot {
  position: sticky; bottom: 0; z-index: 5; background: var(--rm-panel);
  display: flex; justify-content: space-between; align-items: center; gap: .7rem;
  padding: .7rem 0; border-top: 1px solid var(--rule); margin-top: 1rem;
}
.rm-wfoot .rm-btn { padding: .5rem 1.1rem; }

/* ---------- Review ---------- */
.rm-review-head { margin: .4rem 0 1.2rem; }
.rm-review-head .rm-names { font-size: 1.3rem; font-weight: 700; }
.rm-review-head p { margin: .15rem 0; color: var(--muted); }
.rm-counts { color: var(--muted); font-size: .92rem; }
.rm-legend {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center;
  font-size: .82rem; color: var(--muted); margin: .2rem 0 .8rem;
}
.rm-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 5px; vertical-align: 0;
}
.rm-dot-must  { background: #0F6E56; }
.rm-dot-like  { background: #185FA5; }
.rm-dot-maybe { background: #BA7517; }
.rm-dot-off   { background: #A32D2D; }
.rm-group { margin: 1.3rem 0; }
.rm-group-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .35rem; }
.rm-group-art { width: 26px; height: 26px; flex-shrink: 0; }
.rm-group h3 {
  margin: 0; flex: 1; font-size: 1.05rem;
  border-bottom: 2px solid var(--accent); padding-bottom: .25rem;
}
.rm-group-items {
  display: flex; flex-wrap: wrap; gap: .35rem 1.1rem;
  padding-left: 2.05rem; line-height: 1.8;
}
.rm-ritem { white-space: nowrap; }
.rm-ritem-custom { font-style: italic; }
.rm-review-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.8rem 0 1rem; }
.rm-empty { color: var(--muted); font-style: italic; }
.rm-print-footer { display: none; }

/* ---------- Share + Compare ---------- */
.rm-share { border-top: 1px solid var(--rule); margin-top: 1.6rem; padding-top: .4rem; }
.rm-share h3 { margin: .6rem 0 .2rem; }
.rm-share-note { color: var(--muted); font-size: .92rem; margin: .2rem 0 .6rem; }
.rm-share-actions { margin: .6rem 0; align-items: center; }
.rm-share-msg { color: var(--muted); font-size: .88rem; min-height: 1.2em; margin: .2rem 0; }
.rm-cslot { margin: 1.1rem 0; }
.rm-cslot h3 { margin: 0 0 .25rem; font-size: 1rem; }
.rm-cstatus { color: var(--muted); font-size: .88rem; margin: .2rem 0 .4rem; }
.rm-codebox {
  font: inherit; font-size: .85rem; color: var(--fg); background: var(--bg);
  border: 1.5px dashed var(--rule); border-radius: 8px;
  padding: .5rem .7rem; width: 100%; resize: vertical; word-break: break-all;
}
.rm-codebox:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.rm-cchips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.rm-chip {
  font-size: .82rem; font-weight: 600; padding: .2rem .7rem; border-radius: 999px;
  background: var(--rule); color: var(--fg);
}
.rm-chip-align    { background: #E1F5EE; color: #085041; }
.rm-chip-discuss  { background: #FAEEDA; color: #633806; }
.rm-chip-conflict { background: #FCEBEB; color: #791F1F; }
.rm-crow {
  display: grid; grid-template-columns: 1fr 70px 70px 52px;
  gap: .4rem; align-items: center; padding: .3rem 0;
  border-bottom: 1px solid var(--rule);
}
.rm-crow-head { border-bottom: none; color: var(--muted); font-size: .72rem; padding-bottom: 0; }
.rm-ccol { text-align: center; }
.rm-clabel { line-height: 1.35; }
.rm-cdash { color: var(--muted); }
.rm-cv-conflict { background: rgba(226, 75, 74, .08); }
.rm-verdict { text-align: center; font-size: .8rem; font-weight: 700; }
.rm-verdict-align { color: #0F6E56; }
.rm-verdict-discuss { color: #BA7517; font-weight: 600; }
.rm-verdict-conflict { color: #A32D2D; }

/* ---------- Responsive (spec §8.4) ---------- */
@media (max-width: 767px) {
  .rm-item { grid-template-columns: 1fr; }
  .rm-pills { justify-content: flex-start; }
}
@media (max-width: 479px) {
  .rm-pill { padding: .3rem .6rem; }
  .rm-pill .rm-vl { display: none; }
  .rm-pill .rm-vs { display: inline; }
  .rm-cta { flex-direction: column; align-items: stretch; }
}

/* ---------- Print (spec §9): Review is the print surface ---------- */
@page { margin: 0.5in; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .site-footer, .page-date, article > h1,
  #screen-landing, #screen-setup, #screen-wizard,
  .rm-review-actions, .rm-counts, .rm-notice, .rm-share,
  .rm-cslot, .rm-cta, #rm-clegend { display: none !important; }
  #screen-review:not([hidden]), #screen-compare:not([hidden]) { display: block !important; }
  .rm-chip { border: 1px solid #888; }
  .rm-cv-conflict { background: #FCEBEB !important; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  main article { background: none !important; padding: 0 !important; margin: 0 !important; }
  .rm-review-head { text-align: center; border-bottom: 2px solid #26215C; padding-bottom: .5rem; }
  .rm-review-head .rm-names { color: #26215C !important; }
  .rm-review-head p { color: #534AB7 !important; margin: .1rem 0; font-size: 10pt; }
  .rm-legend { color: #444 !important; font-size: 8.5pt; }
  .rm-group { break-inside: avoid; page-break-inside: avoid; margin: .9rem 0; }
  .rm-group h3 { font-size: 11.5pt; }
  .rm-group-items { font-size: 10pt; line-height: 1.7; }
  .rm-print-footer {
    display: block; margin-top: 1.2rem; padding-top: .5rem; text-align: center;
    border-top: 1px solid #888; color: #666 !important; font-size: 8pt;
  }
}
