/* Ragulika IP - reader gate.
 * Sits inside the existing page styles and borrows their type and colour.
 * Works in light and dark, which the site already switches with data-theme.
 */

.rg-wall {
  position: relative;
  margin: -60px 0 28px;
  padding-top: 60px;
  font: 400 15px/1.65 "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

/* The read fades out rather than stopping dead, so the wall feels like the
   end of a passage rather than a shutter coming down. */
.rg-wall-fade {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--rg-bg, #fff) 88%);
}

.rg-wall-card {
  position: relative;
  border: 1px solid var(--rg-line, #e3e6ee);
  border-radius: 14px;
  background: var(--rg-card, #fbfcfe);
  padding: 26px 24px 20px;
  max-width: 560px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -18px rgba(16, 24, 40, .28);
}

.rg-wall-eyebrow {
  margin: 0 0 6px;
  font: 700 11.5px/1.3 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--rg-gold, #9a6b12);
}

.rg-wall-title {
  margin: 0 0 8px;
  font: 700 21px/1.3 "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--rg-ink, #16233c);
}

.rg-wall-sub {
  margin: 0 0 18px;
  color: var(--rg-muted, #5a6478);
  font-size: 14.5px;
}

.rg-wall-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 9px;
  border: 1px solid var(--rg-line, #d8dce8);
  background: #fff;
  color: var(--rg-ink, #16233c);
  font: 600 14.5px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .06s ease;
}

.rg-btn:hover  { border-color: var(--rg-accent, #2f5fd0); background: #f7f9ff; }
.rg-btn:active { transform: translateY(1px); }
.rg-btn:disabled { opacity: .6; cursor: default; transform: none; }

.rg-btn-primary {
  background: var(--rg-accent, #2f5fd0);
  border-color: var(--rg-accent, #2f5fd0);
  color: #fff;
  margin-top: 4px;
}
.rg-btn-primary:hover { background: #2650b4; border-color: #2650b4; }

.rg-wall-panel { margin-top: 16px; }

.rg-form { display: flex; flex-direction: column; gap: 6px; }

.rg-form label {
  font: 600 13px/1.4 "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--rg-ink, #16233c);
  margin-top: 8px;
}

.rg-form input {
  padding: 10px 12px;
  border: 1px solid var(--rg-line, #d8dce8);
  border-radius: 8px;
  background: #fff;
  color: var(--rg-ink, #16233c);
  font: 400 15px/1.4 "Plus Jakarta Sans", system-ui, sans-serif;
}
.rg-form input:focus {
  outline: none;
  border-color: var(--rg-accent, #2f5fd0);
  box-shadow: 0 0 0 3px rgba(47, 95, 208, .14);
}

.rg-hint  { margin: 4px 0 0; font-size: 12.5px; color: var(--rg-muted, #5a6478); }

.rg-link {
  background: none;
  border: 0;
  padding: 8px 0 0;
  color: var(--rg-accent, #2f5fd0);
  font: 500 13.5px/1.4 "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
}
.rg-link:hover { text-decoration: underline; }

.rg-note {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13.5px;
}
.rg-note-error { background: #fdf0ef; color: #9b2c22; border: 1px solid #f6d5d1; }
.rg-note-info  { background: #eef4ff; color: #21467f; border: 1px solid #d4e1fb; }

.rg-gbtn { display: flex; justify-content: center; padding: 4px 0; }

.rg-wall-foot  { margin: 16px 0 0; font-size: 13.5px; color: var(--rg-muted, #5a6478); }
.rg-wall-foot a { color: var(--rg-accent, #2f5fd0); }

.rg-wall-legal {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--rg-muted2, #78829a);
}
.rg-wall-legal a { color: inherit; text-decoration: underline; }

/* The quiet line that tells a reader how much of the allowance is left. */
.rg-meter {
  margin: 0 0 16px;
  padding: 8px 12px;
  border-left: 3px solid var(--rg-gold, #c79a3a);
  background: var(--rg-card, #fbfcfe);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--rg-muted, #5a6478);
}
.rg-meter a { color: var(--rg-accent, #2f5fd0); font-weight: 600; }

/* Dark, matching the toggle the site already has. */
:root[data-theme="dark"] {
  --rg-bg: #0f1729;
  --rg-card: #16203a;
  --rg-line: #2a3550;
  --rg-ink: #e8ecf6;
  --rg-muted: #a6b0c6;
  --rg-muted2: #8792ab;
  --rg-accent: #6f9bff;
  --rg-gold: #d9b45f;
}

:root[data-theme="dark"] .rg-btn        { background: #1b2743; color: #e8ecf6; }
:root[data-theme="dark"] .rg-btn:hover  { background: #22304f; }
:root[data-theme="dark"] .rg-btn-primary { background: #3f6fd8; border-color: #3f6fd8; color: #fff; }
:root[data-theme="dark"] .rg-form input { background: #1b2743; color: #e8ecf6; }
:root[data-theme="dark"] .rg-note-error { background: #3a1d1c; color: #f4b8b2; border-color: #5b2a27; }
:root[data-theme="dark"] .rg-note-info  { background: #172a4a; color: #bcd2ff; border-color: #26406d; }

@media (max-width: 560px) {
  .rg-wall-card { padding: 22px 18px 18px; border-radius: 12px; }
  .rg-wall-title { font-size: 19px; }
}
