/* REPORTS phase B1 — on site (RpStart, RpOutline, RpCapture, RpMarkup, RpCompile).
 * Karan 28/10/2026; design Track-reports.pdf pp. 2–3.
 * The phone's own palette (tokens/mobile.css --m-*, defined at :root for both
 * themes), so the phone app and the tablet layer draw the same thing. No bare
 * hex, weights 400/500 only. Loaded only when a report is opened
 * (report-capture.js ensureCss). Split view (outline beside the area) from 900px. */

.rpc { font-family: var(--font-sans); color: var(--m-ink); background: var(--m-bg); -webkit-tap-highlight-color: transparent; }
:where(.rpc) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; }
:where(.rpc) button[aria-disabled="true"] { cursor: default; }
.rpc *:focus-visible { outline: 2px solid var(--m-accent); outline-offset: 2px; }

/* The tablet / PC layer: full screen, clear of the notch. */
.rpc-layer { position: fixed; inset: 0; z-index: 60; background: var(--m-bg); overflow: hidden;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); box-sizing: border-box; }
.rpc-layer > .rpc { height: 100%; overflow-y: auto; }
.rpc-layer > .rpc-desk > .rpc-screen { max-width: 640px; margin: 0 auto; }

/* ── Screen frame ───────────────────────────────────────────────────────── */
.rpc-screen { padding: calc(10px + env(safe-area-inset-top, 0px)) 20px 24px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; min-height: 100%; }
.rpc-layer .rpc-screen { padding-top: 16px; }
.rpc-screen.has-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.rpc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 4px; }
.rpc-h1 { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.rpc-sub { font-size: 13px; color: var(--m-ink2); margin-top: 2px; }
.rpc-back { display: inline-flex; align-items: center; gap: 4px; color: var(--m-accent); font-size: 14px; min-height: 32px; }
.rpc-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 999px; background: var(--m-segment); display: inline-flex; align-items: center; justify-content: center; color: var(--m-ink2); }
.rpc-x.sm { width: 28px; height: 28px; }
.rpc-lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 500; color: var(--m-ink); margin-top: 8px; }
.rpc-lbl span { font-size: 11.5px; font-weight: 400; color: var(--m-ink3); text-align: right; }
.rpc-lbl span.first { font-size: 12px; color: var(--m-ink2); text-align: left; }
.rpc-note { font-size: 13px; line-height: 1.45; color: var(--m-ink2); margin: 2px 0; }
.rpc-note.warn { color: var(--m-late); }
.rpc-note.err { color: var(--m-late); font-weight: 500; }
.rpc-mute { font-size: 12px; color: var(--m-ink3); }
.rpc-num { font-family: var(--font-technical); font-variant-numeric: tabular-nums; font-size: 14px; }
.rpc-empty { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 40px 8px; max-width: 520px; }

/* "Works offline" — the truth about what's waiting */
.rpc-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--m-ok); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rpc-ok.warn { color: var(--m-late); }
.rpc-ok.quiet { color: var(--m-ink3); }   /* P6: routine sync is grey */
.rpc-dot.quiet { background: var(--m-ink3); }
.rpc-ok.err { color: var(--m-late); font-weight: 500; white-space: normal; }
.rpc-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 999px; background: var(--m-attention); display: inline-block; }
.rpc-dot.live { animation: rpc-pulse 1.2s linear infinite; }
@keyframes rpc-pulse { 50% { opacity: 0.35; } }
.rpc-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.rpc-text, .rpc-input { width: 100%; box-sizing: border-box; border: 0; border-radius: 12px; background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-hair2);
  color: var(--m-ink); font: inherit; font-size: 15px; line-height: 1.45; padding: 12px 14px; resize: vertical; }
.rpc-input { height: 46px; padding: 0 14px; }
.rpc-text.bare { box-shadow: none; background: transparent; padding: 4px 0; resize: none; }
.rpc-input.chipin { width: auto; flex: 1 1 160px; height: 38px; border-radius: 999px; }
.rpc-ask { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.rpc-btn { min-height: 48px; padding: 0 16px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: inset 0 0 0 1px var(--m-hair2); background: var(--m-card); font-size: 15px; font-weight: 500; text-align: center; }
.rpc-btn.primary { background: var(--m-primary); color: var(--m-on-primary); box-shadow: none; }
.rpc-btn.primary[aria-disabled="true"] { background: var(--m-btn-disabled); }
.rpc-btn[aria-disabled="true"] { color: var(--m-ink3); }
.rpc-btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.rpc-btn.icon { width: 52px; padding: 0; flex: 0 0 52px; }
.rpc-btn.wide { width: 100%; background: var(--m-segment); box-shadow: none; }
.rpc-link { color: var(--m-accent); font-size: 14px; font-weight: 500; min-height: 32px; display: inline-flex; align-items: center; text-decoration: none; }
.rpc-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; gap: 10px; padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--m-bg); box-shadow: 0 -1px 0 var(--m-hair); }
.rpc-foot .rpc-btn { flex: 1 1 0; }
.rpc-foot .rpc-btn.icon { flex: 0 0 52px; }
.rpc-foot.col { flex-direction: column; }
.rpc-layer .rpc-foot { position: sticky; margin: auto -20px -24px; }

/* ── RpStart ────────────────────────────────────────────────────────────── */
.rpc-types { display: flex; flex-direction: column; gap: 8px; }
.rpc-type { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--m-hair2); background: var(--m-card); min-height: 48px; }
.rpc-type.on { box-shadow: inset 0 0 0 2px var(--m-ink); }
.rpc-type.off { opacity: 0.55; }
.rpc-radio { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--m-hair2); margin-top: 1px; box-sizing: border-box; }
.rpc-type.on .rpc-radio { box-shadow: inset 0 0 0 5px var(--m-ink); }
.rpc-type-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rpc-type-b b { font-size: 14.5px; font-weight: 500; }
.rpc-type-d { font-size: 12.5px; line-height: 1.4; color: var(--m-ink2); }
.rpc-later { font-size: 11px; color: var(--m-ink3); }
.rpc-minis { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rpc-mini { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--m-segment); color: var(--m-ink2); }

/* ── Rows (outline, observations, people) ───────────────────────────────── */
.rpc-row, .rpc-orow, .rpc-obsrow, .rpc-figrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--m-hair); color: var(--m-ink); }
.rpc-orow { min-height: 60px; }
.rpc-orow.cur { background: var(--m-segment); margin: 0 -20px; padding: 10px 20px; width: calc(100% + 40px); }
.rpc-row-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rpc-row-b b { font-size: 15px; font-weight: 500; }
.rpc-row-b span { font-size: 12.5px; line-height: 1.4; color: var(--m-ink2); }
.rpc-obsrow .rpc-row-b span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rpc-orow > svg, .rpc-row > svg { color: var(--m-ink3); flex: 0 0 auto; }
.rpc-st { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--m-hair2); color: var(--m-ink); }
.rpc-st.done { background: var(--m-ok-tint); color: var(--m-ok); box-shadow: none; }
.rpc-st.cur { background: var(--m-primary); color: var(--m-on-primary); box-shadow: none; }
.rpc-st.off { color: var(--m-ink3); }
.rpc-th { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 6px; background: var(--m-segment) center / cover no-repeat; }
.rpc-th.big { flex-basis: 72px; width: 72px; height: 72px; }
.rpc-obs { display: flex; flex-direction: column; }

/* ── RpCapture ──────────────────────────────────────────────────────────── */
.rpc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rpc-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--m-hair2); font-size: 13.5px; display: inline-flex; align-items: center; }
.rpc-chip.on { background: var(--m-primary); color: var(--m-on-primary); box-shadow: none; }
.rpc-phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.rpc-phs.small { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.rpc-ph { position: relative; aspect-ratio: 1; border-radius: 8px; background: var(--m-segment) center / cover no-repeat; overflow: hidden; }
.rpc-ph.add { box-shadow: inset 0 0 0 1.5px var(--m-hair2); background: var(--m-card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--m-ink2); }
.rpc-fig, .rpc-mkd { position: absolute; left: 6px; bottom: 6px; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--m-toast-bg); color: var(--m-toast-ink); }
.rpc-mkd { left: auto; right: 6px; background: var(--m-attention); }
.rpc-voice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--m-segment); }
.rpc-voice .rpc-row-b span { font-size: 13.5px; color: var(--m-ink); }
.rpc-vi { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 999px; background: var(--m-primary); color: var(--m-on-primary); display: inline-flex; align-items: center; justify-content: center; }
.rpc-vi svg { width: 16px; height: 16px; }
.rpc-rec { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--m-attention); }
.rpc-meter { flex: 1; display: flex; align-items: center; gap: 3px; height: 24px; overflow: hidden; }
.rpc-meter i { flex: 0 0 3px; border-radius: 2px; background: var(--m-attention); }
.rpc-word { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--m-blue-tint); box-shadow: inset 0 0 0 1px var(--m-blue-tint-2); }
.rpc-word.muted { color: var(--m-ink2); font-size: 13.5px; }
.rpc-word p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--m-ink); }
.rpc-wh { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--m-accent); }
.rpc-pn { color: var(--m-accent); font-weight: 500; }
.rpc-wnote { font-size: 12px; line-height: 1.4; color: var(--m-ink2); }
.rpc-wnote.warn { color: var(--m-late); }

/* ── RpMarkup ───────────────────────────────────────────────────────────── */
.rpc-mk { position: fixed; inset: 0; z-index: 70; background: var(--m-toast-bg); display: flex; flex-direction: column; overflow-y: auto;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.rpc-mk-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; color: var(--m-toast-ink); font-size: 15px; }
.rpc-mk-a { color: var(--m-toast-ink); min-height: 40px; padding: 0 4px; font-size: 15px; }
.rpc-mk-stage { position: relative; width: 100%; max-height: calc(64 * var(--vh)); margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; display: flex; align-items: center; justify-content: center; }
.rpc-mk-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.rpc-mk-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rpc-mk-stage .rpc-mute { color: var(--m-toast-ink); }
.rpc-mk-s { fill: none; stroke: var(--m-attention); stroke-linecap: round; stroke-linejoin: round; }
.rpc-mk-m { fill: none; stroke: var(--m-toast-ink); }
.rpc-mk-tag { fill: var(--m-attention); }
.rpc-mk-navy { fill: var(--m-toast-bg); stroke: var(--m-toast-ink); stroke-width: 1; }
.rpc-mk-t { fill: var(--m-toast-ink); font-family: var(--font-sans); font-weight: 500; }
.rpc-mk-ask { display: flex; gap: 8px; padding: 10px 16px; background: var(--m-toast-bg); }
.rpc-tools { display: flex; justify-content: space-around; padding: 8px 6px; background: var(--m-toast-bg); color: var(--m-toast-ink); }
.rpc-tool { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 52px; min-height: 52px; justify-content: center; border-radius: 10px; font-size: 11.5px; color: var(--m-toast-ink); }
.rpc-tool.on { background: rgba(245, 245, 245, 0.14); }
.rpc-tool[aria-disabled="true"] { opacity: 0.4; }
.rpc-mk-cap { background: var(--m-bg); padding: 10px 16px 16px; flex: 1; }
.rpc-layer .rpc-mk { position: absolute; }
.rpc-layer .rpc-mk-stage { max-width: min(100%, calc(calc(64 * var(--vh)) * 1.6)); }

/* ── RpCompile ──────────────────────────────────────────────────────────── */
.rpc-checks { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--m-hair2); padding: 0 14px; }
.rpc-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--m-hair); }
.rpc-check:last-child { border-bottom: 0; }
.rpc-ck { flex: 0 0 18px; margin-top: 1px; color: var(--m-ok); }
.rpc-ck.warn, .rpc-ck.block { color: var(--m-late); }
.rpc-becomes { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--m-segment); font-size: 13.5px; }
.rpc-becomes dt { color: var(--m-ink2); }
.rpc-becomes dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.rpc-pick { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--m-hair2); font-size: 15px; }
.rpc-pick span { flex: 1; }
.rpc-pick em { font-style: normal; font-size: 13px; color: var(--m-ink2); }
.rpc-done { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--m-ok-tint); }
.rpc-done b { font-weight: 500; }
.rpc-done span { font-size: 13px; color: var(--m-ink2); }
.rpc-switch { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.rpc-switch i { width: 40px; height: 24px; border-radius: 999px; background: var(--m-hair2); position: relative; flex: 0 0 40px; }
.rpc-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: var(--m-card); transition: left var(--m-tick, 160ms) var(--ease-out, ease-out); }
.rpc-switch.on i { background: var(--m-ok); }
.rpc-switch.on i::after { left: 19px; }
.rpc-figs { display: flex; flex-direction: column; }

/* ── Sheet + toast ──────────────────────────────────────────────────────── */
.rpc-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(12, 17, 57, 0.4); }
.rpc-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; max-height: calc(75 * var(--vh)); overflow-y: auto; background: var(--m-bg); border-radius: 16px 16px 0 0;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; }
.rpc-plist { display: flex; flex-direction: column; }
.rpc-toast { position: fixed; left: 24px; right: 24px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 90; margin: 0 auto; max-width: 420px; padding: 12px 16px; border-radius: 14px;
  background: var(--m-toast-bg); color: var(--m-toast-ink); font-size: 14.5px; text-align: center; pointer-events: none; }

/* ── Split view: the outline beside the area you're in (tablet, PC) ─────── */
@media (min-width: 900px) {
  .rpc-split { display: grid; grid-template-columns: minmax(320px, 380px) 1fr; height: 100%; overflow: hidden; }
  .rpc-side { border-right: 1px solid var(--m-hair); overflow-y: auto; background: var(--m-ground); }
  .rpc-side .rpc-screen { background: var(--m-ground); }
  .rpc-side .rpc-orow.cur { background: var(--m-card); }
  .rpc-main { overflow-y: auto; }
  .rpc-main > .rpc-screen { max-width: 760px; }
  .rpc-sheet { left: auto; right: 24px; bottom: 24px; width: 420px; border-radius: 16px; }
  .rpc-phs { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}

/* ── The phone, one step at a time (v4.23.6; phone-steps.js) ────────────────
   ≤ 760 px or the phone app. Release D (docs/phone-release-d/BRIEF.md §5.E) draws
   the phone's steps with the phone's own components (v4/phone.css, the .p4-* and
   §5.E .p4-rp-* classes, under .m-app), so the Release C flow classes (.rpc-f-*,
   .rpc-opt, .rpc-cp-*) and the phone list's .m-app .rpl-* are gone. What stays here
   is the hidden field that keeps the keyboard up across a repaint. */
.rpc-kbd { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; pointer-events: none; }
