
/* ── REGULATION DRAWER ─────────────────────────────────── */
#rdTrigger {
  position: fixed; bottom: 24px; right: 24px; z-index: 9998;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold); color: var(--dark);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
  transition: transform 0.15s ease;
}
#rdTrigger:hover { transform: scale(1.06); }

#rdOverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 9997; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
#rdOverlay.rd-open { opacity: 1; pointer-events: auto; }

#rdPanel {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw;
  height: 100vh; background: var(--dark-mid); border-left: 1px solid var(--dark-border);
  z-index: 9999; display: flex; flex-direction: column;
  transition: right 0.25s ease; box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
#rdPanel.rd-open { right: 0; }

.rd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px 18px; border-bottom: 1px solid var(--dark-border);
}
.rd-header-title {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.rd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; }
.rd-close {
  background: none; border: none; color: var(--text-muted); font-size: 22px;
  cursor: pointer; line-height: 1; padding: 0 4px;
}

.rd-tabs { display: flex; gap: 4px; padding: 12px 14px 0 14px; }
.rd-tab {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  padding: 8px 12px; cursor: pointer; border-radius: 6px 6px 0 0;
}
.rd-tab-active { background: var(--dark-card); color: var(--text-bright); }

.rd-view { padding: 16px; overflow-y: auto; flex: 1; }
.rd-view-ask { display: flex; flex-direction: column; }

.rd-sample-note {
  font-family: monospace; font-size: 10px; color: var(--text-muted);
  margin-bottom: 10px; letter-spacing: 0.02em;
}
.rd-card {
  background: var(--dark-card); border: 1px solid var(--dark-border);
  border-radius: 10px; padding: 16px; margin-bottom: 14px;
}
.rd-card-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.rd-summary-text { font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }

.rd-tool-list { display: flex; flex-direction: column; gap: 6px; }
.rd-tool-item { border: 1px solid var(--dark-border); border-radius: 8px; overflow: hidden; }
.rd-tool-title {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; font-size: 12px; color: var(--text-bright);
  cursor: pointer; background: var(--dark-card2);
}
.rd-tool-title:hover { background: var(--dark-border); }
.rd-tool-chevron { color: var(--gold); font-size: 14px; }
.rd-tool-body {
  padding: 10px 12px; font-size: 12px; line-height: 1.6;
  color: var(--text-muted); border-top: 1px solid var(--dark-border);
}

.rd-domain-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rd-domain-btn {
  background: var(--dark-card); border: 1px solid var(--dark-border);
  color: var(--text-muted); font-size: 10.5px; padding: 6px 10px;
  border-radius: 14px; cursor: pointer;
}
.rd-domain-btn-active { background: var(--gold); border-color: var(--gold); color: var(--dark); font-weight: 600; }

.rd-gauge-row { margin-bottom: 14px; }
.rd-gauge-row:last-child { margin-bottom: 0; }
.rd-gauge-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rd-gauge-label { font-size: 11.5px; color: var(--text); }
.rd-priority {
  font-size: 8.5px; color: var(--red); border: 1px solid var(--red);
  border-radius: 3px; padding: 1px 4px; margin-left: 6px; letter-spacing: 0.04em;
}
.rd-gauge-score { font-family: monospace; font-size: 12px; color: var(--text-bright); }
.rd-gauge-max { color: var(--text-muted); }
.rd-track { width: 100%; height: 5px; background: var(--dark-border); border-radius: 3px; overflow: hidden; }
.rd-track-fill { height: 100%; border-radius: 3px; }

.rd-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rd-bubble { font-size: 12.5px; line-height: 1.55; padding: 10px 12px; border-radius: 9px; max-width: 88%; white-space: pre-wrap; }
.rd-bubble-user { align-self: flex-end; background: var(--dark-card2); color: var(--text-bright); }
.rd-bubble-assistant { align-self: flex-start; background: var(--dark-card); border: 1px solid var(--dark-border); color: var(--text-muted); }
.rd-bubble-loading { color: var(--text-muted); }

.rd-recur-banner {
  background: rgba(196,120,74,0.1); border: 1px solid rgba(196,120,74,0.35);
  border-radius: 8px; padding: 12px; margin-bottom: 10px;
}
.rd-recur-title { font-size: 12px; color: var(--text-bright); margin-bottom: 3px; }
.rd-recur-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.rd-recur-link { font-size: 11px; color: var(--red); font-weight: 600; text-decoration: none; }

.rd-input-row { display: flex; gap: 8px; }
.rd-input {
  flex: 1; background: var(--dark-card); border: 1px solid var(--dark-border);
  border-radius: 8px; padding: 10px 12px; color: var(--text-bright); font-size: 12.5px; outline: none;
}
.rd-send {
  background: var(--gold); color: var(--dark); border: none; border-radius: 8px;
  padding: 0 16px; font-size: 12px; font-weight: 600; cursor: pointer;
}

@media (max-width: 480px) {
  #rdPanel { width: 100vw; max-width: 100vw; }
}
