/* Report Builder — journey diagrams (reconstructed, drawn for the portfolio) */
.rbj {
  margin: 2rem 0 2.5rem;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  background: #f4f1ea;
  border: 1px solid #e3ddd1;
}
.rbj-kicker {
  margin: 0 0 1rem;
  color: #6a6359;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rbj figcaption { margin-top: 1rem; color: #5a544b; font-size: 0.9rem; line-height: 1.55; }
.rbj figcaption strong { color: #1f1d1a; }

/* Before / after pair */
.rbj-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rbj-panel { padding: 16px; background: #fff; border: 1px solid #e3ddd1; display: flex; flex-direction: column; gap: 10px; }
.rbj-tag { align-self: flex-start; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.rbj-tag.is-before { background: #f1ede6; color: #5f5a52; }
.rbj-tag.is-after { background: #e7efe9; color: #1f5135; }
.rbj-panel h4 { margin: 0; font-size: 0.98rem; line-height: 1.3; }
.rbj-panel p { margin: 0; font-size: 0.86rem; line-height: 1.5; color: #4a463f; }

/* Flow boxes */
.rbj-flow { display: flex; flex-direction: column; gap: 6px; }
.rbj-row { display: flex; gap: 6px; }
.rbj-box {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d6d0c4;
  border-radius: 4px;
  background: #faf8f4;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
}
.rbj-box.is-strong { background: #1f1d1a; border-color: #1f1d1a; color: #fff; }
.rbj-box.is-warn { border-style: dashed; color: #8a3b2a; }
.rbj-arrow { text-align: center; color: #8a8378; font-size: 0.8rem; line-height: 1; }

/* Mini wireframe for RITE */
.rbj-wire { display: grid; grid-template-columns: 34% 1fr; gap: 6px; height: 150px; }
.rbj-wire-rail, .rbj-wire-main { background: #faf8f4; border: 1px solid #d6d0c4; border-radius: 4px; padding: 6px; display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
.rbj-ctl { height: 16px; border-radius: 3px; background: #e6e1d7; flex: 0 0 auto; }
.rbj-ctl.is-tall { height: 26px; }
.rbj-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rbj-chip { height: 12px; width: 38px; border-radius: 999px; background: #1f1d1a; opacity: 0.75; }
.rbj-result { flex: 1; border-radius: 3px; background: repeating-linear-gradient(#efebe3 0 8px, #faf8f4 8px 14px); }
.rbj-note { font-size: 0.72rem; color: #7a736a; }

/* Translation table */
.rbj-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.88rem; }
.rbj-table th, .rbj-table td { padding: 10px 12px; border: 1px solid #e3ddd1; text-align: left; vertical-align: top; line-height: 1.45; }
.rbj-table th { background: #faf8f4; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: #5f5a52; }

/* Entry points */
.rbj-entry { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rbj-entry .rbj-box { background: #fff; text-align: left; }
.rbj-entry .rbj-box small { display: block; margin-top: 4px; color: #6a6359; font-size: 0.72rem; }
.rbj-badge { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 999px; background: #e7efe9; color: #1f5135; font-size: 0.7rem; font-weight: 600; }

@media (max-width: 640px) {
  .rbj-pair, .rbj-entry { grid-template-columns: minmax(0, 1fr); }
  .rbj-table { font-size: 0.82rem; }
}

/* On-page guide (key-numbers strip lives in case-problem.css) */
.rb-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0 0 2rem;
  padding: 10px 0;
  border-top: 1px solid #e3ddd1;
  border-bottom: 1px solid #e3ddd1;
  font-size: 0.88rem;
}
.rb-guide span { color: #6a6359; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.rb-guide a { display: inline-flex; align-items: center; min-height: 36px; color: #1f1d1a; text-decoration: none; border-bottom: 1px solid transparent; }
.rb-guide a:hover { border-bottom-color: #1f1d1a; }
.rb-boundary { color: #5a544b; font-size: 0.92rem; font-style: italic; }
html { scroll-padding-top: 80px; }
@media (max-width: 640px) {
  .rb-guide a { min-height: 44px; }
}

/* RITE before/after: labelled zones and the bottom result drawer */
.rbj-zone { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6a6359; line-height: 1.2; }
.rbj-wire { height: 170px; }
.rbj-wire.is-after { grid-template-columns: 34% 1fr; grid-template-rows: 1fr 58px; }
.rbj-wire-drawer {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px;
  background: #faf8f4;
  border: 1px solid #1f1d1a;
  border-radius: 4px;
  overflow: hidden;
}
.rbj-wire .rbj-row { height: 10px; border-radius: 3px; background: #ece7dd; flex: 0 0 auto; }
.rbj-wire.is-before { grid-template-columns: 1fr 34%; }

/* Illustrative reporting date picker — sleek clinical-enterprise styling (not a copy of any product system) */
.dp {
  --dp-ink: #1a2433; --dp-mute: #5c6878; --dp-faint: #8a94a3; --dp-line: #e3e7ec; --dp-bg: #f6f8fa;
  --dp-text: 0.875rem; --dp-small: 0.75rem; --dp-cap: 0.68rem; --dp-ctl: 34px; --dp-row: 36px; --dp-cell: 34px; --dp-month-w: 270px;
  --dp-accent: #1f66c1; --dp-accent-soft: #e9f1fb; --dp-ok: #1e6b45; --dp-ok-soft: #e7f4ec;
  font-family: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--dp-text); color: var(--dp-ink);
  background: #fff; border: 1px solid var(--dp-line); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.08);
  overflow: hidden;
}
.dp button, .dp select, .dp input { font-family: inherit; }
.dp-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--dp-line); }
.dp-field-name { font-size: var(--dp-text); font-weight: 600; color: var(--dp-ink); }
.dp-field-note { margin-left: auto; font-size: var(--dp-small); color: var(--dp-faint); }
.dp-field-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--dp-cap); font-weight: 600; color: var(--dp-faint); }
.dp-select {
  min-height: var(--dp-ctl); padding: 0 30px 0 10px; border: 1px solid #ccd3dc; border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235c6878' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none; -webkit-appearance: none; font-size: var(--dp-text); color: var(--dp-ink);
}
.dp-select:hover { border-color: #a9b4c2; }
.dp-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 300px; }
.dp-pane { min-width: 0; }

/* Left rail */
.dp-modes { display: flex; flex-direction: column; gap: 1px; padding: 12px 0; border-right: 1px solid var(--dp-line); background: var(--dp-bg); }
.dp-rail-k { padding: 0 16px 8px; font-size: var(--dp-cap); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dp-faint); }
.dp-mode {
  position: relative; min-height: var(--dp-row); padding: 0 16px; border: 0; background: transparent;
  font-size: var(--dp-text); color: var(--dp-mute); text-align: left; cursor: pointer;
}
.dp-mode:hover { color: var(--dp-ink); background: #eef1f5; }
.dp-mode.is-on { color: var(--dp-accent); font-weight: 600; background: #fff; }
.dp-mode.is-on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--dp-accent); }

/* Right pane */
.dp-relative, .dp-calendar, .dp-months { padding: 16px; min-width: 0; }
.dp-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; }
.dp-preset {
  display: flex; align-items: center; gap: 10px; min-height: var(--dp-row); padding: 0 10px;
  border: 0; border-radius: 4px; background: transparent; font-size: var(--dp-text); color: var(--dp-ink); text-align: left; cursor: pointer;
}
.dp-preset::before { content: ""; flex: 0 0 auto; width: 14px; height: 14px; border: 1.5px solid #b7c0cc; border-radius: 50%; box-sizing: border-box; }
.dp-preset:hover { background: var(--dp-bg); }
.dp-preset.is-on { background: var(--dp-accent-soft); color: #12417f; font-weight: 600; }
.dp-preset.is-on::before { border: 4px solid var(--dp-accent); }
.dp-lastn {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 0 0;
  border-top: 1px solid var(--dp-line); color: var(--dp-mute);
}
.dp-lastn.is-on span { color: var(--dp-accent); font-weight: 600; }
.dp-lastn input {
  width: 64px; min-height: var(--dp-ctl); padding: 0 8px; border: 1px solid #ccd3dc; border-radius: 4px; font-size: var(--dp-text); color: var(--dp-ink);
}
.dp-lastn.is-on input, .dp-lastn.is-on .dp-select { border-color: var(--dp-accent); }
.dp-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--dp-text); color: var(--dp-mute); }
.dp-check input { width: 16px; height: 16px; accent-color: var(--dp-accent); }

.dp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 600; font-size: var(--dp-text); }
.dp-nav {
  width: var(--dp-cell); height: var(--dp-cell); border: 0; border-radius: 50%; background: transparent;
  font-size: 1.15rem; line-height: 1; color: var(--dp-mute); cursor: pointer;
}
.dp-nav:hover { background: var(--dp-bg); color: var(--dp-ink); }
.dp-cal-wrap { display: grid; grid-template-columns: minmax(0, var(--dp-month-w)); justify-content: center; }
.dp-cal-wrap.is-two { grid-template-columns: repeat(2, minmax(0, var(--dp-month-w))); gap: 12px; }
.dp-cal-month { min-width: 0; box-sizing: border-box; padding: 10px; border: 1px solid var(--dp-line); border-radius: 6px; }
.dp-nav-space { width: var(--dp-cell); height: var(--dp-cell); }
.dp-hint { margin: 0 0 10px; font-size: var(--dp-small); text-align: center; color: var(--dp-faint); }
.dp-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.dp-dow { padding: 4px 0 6px; text-align: center; font-size: var(--dp-cap); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dp-faint); }
.dp-day {
  justify-self: center; width: var(--dp-cell); height: var(--dp-cell); border: 0; border-radius: 50%;
  background: transparent; font-size: var(--dp-text); color: var(--dp-ink); cursor: pointer;
}
.dp-day:hover { background: var(--dp-bg); }
.dp-day.is-today { box-shadow: inset 0 0 0 1px var(--dp-accent); color: var(--dp-accent); font-weight: 600; }
.dp-day.is-in { justify-self: stretch; width: auto; border-radius: 0; background: var(--dp-accent-soft); color: #12417f; }
.dp-day.is-sel { background: var(--dp-accent); color: #fff; font-weight: 600; box-shadow: none; }

.dp-month-grid { max-width: var(--dp-month-w); margin: 0 auto; box-sizing: border-box; padding: 10px; border: 1px solid var(--dp-line); border-radius: 6px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dp-month {
  min-height: var(--dp-row); border: 1px solid transparent; border-radius: 4px; background: transparent;
  font-size: var(--dp-text); color: var(--dp-ink); cursor: pointer;
}
.dp-month:hover:not(:disabled) { background: var(--dp-bg); border-color: var(--dp-line); }
.dp-month.is-sel { background: var(--dp-accent); color: #fff; font-weight: 600; }
.dp-month:disabled { color: #c3cad3; cursor: not-allowed; }

/* Footer */
.dp-summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; row-gap: 2px; align-items: center;
  padding: 12px 16px; border-top: 1px solid var(--dp-line); background: var(--dp-bg);
}
.dp-summary > * { grid-column: 1; }
.dp-summary > .dp-actions { grid-column: 2; grid-row: 1 / span 5; }
.dp-sum-k { font-size: var(--dp-cap); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dp-faint); }
#dp-sum-label { font-size: var(--dp-small); font-weight: 600; color: var(--dp-mute); }
.dp-sum-range { font-size: 1.05rem; font-weight: 600; color: var(--dp-ink); }
.dp-sum-note { justify-self: start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: var(--dp-small); font-weight: 600; }
.dp-sum-note.is-moving { background: var(--dp-ok-soft); color: var(--dp-ok); }
.dp-sum-note.is-fixed { background: #edf0f4; color: var(--dp-mute); }
.dp-sum-run { font-size: var(--dp-small); color: var(--dp-faint); }
.dp-actions { display: flex; gap: 8px; }
.dp-btn {
  min-height: var(--dp-ctl); padding: 0 16px; border: 1px solid #ccd3dc; border-radius: 4px; background: #fff;
  font-size: var(--dp-text); font-weight: 600; color: var(--dp-ink); cursor: pointer;
}
.dp-btn:hover { border-color: #a9b4c2; }
.dp-btn.is-primary { background: var(--dp-accent); border-color: var(--dp-accent); color: #fff; }
.dp-btn.is-primary:hover { background: #1957a6; border-color: #1957a6; }
.dp-status { font-size: var(--dp-small); color: var(--dp-ok); min-height: 1em; }
.dp button:focus-visible, .dp select:focus-visible, .dp input:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: 2px; }
.dp .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
  .dp-top { flex-wrap: wrap; }
  .dp-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .dp-modes { flex-direction: row; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--dp-line); }
  .dp-rail-k { display: none; }
  .dp-mode { flex: 1 0 auto; padding: 0 12px; white-space: nowrap; text-align: center; }
  .dp-mode.is-on::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 3px; border-radius: 2px 2px 0 0; }
  .dp-relative, .dp-calendar, .dp-months { padding: 14px; }
  .dp-presets { grid-template-columns: minmax(0, 1fr); }
  .dp-cal-wrap.is-two { grid-template-columns: minmax(0, var(--dp-month-w)); gap: 16px; }
  .dp-summary { grid-template-columns: minmax(0, 1fr); }
  .dp-summary > .dp-actions { grid-column: 1; grid-row: auto; padding-top: 8px; }
}
.rbj-source { display: block; margin-top: 6px; color: #7a736a; font-size: 0.82rem; font-style: italic; }
