:root {
  --rp-max-width: 1120px;
}

body {
  background: radial-gradient(circle at top, var(--chat-surface-2) 0, var(--chat-bg-dark) 55%, #000 100%);
  color: var(--chat-text-primary);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rp-page {
  padding: 1.5rem 1.25rem 3rem;
}

@media (min-width: 768px) {
  .rp-page {
    padding: 2rem 2rem 4rem;
  }
}

/* Hero */
.rp-hero {
  padding: 1rem 0 2.5rem;
}

.rp-hero-inner {
  max-width: var(--rp-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .rp-hero-inner {
    flex-direction: row;
    align-items: stretch;
  }
}

.rp-hero-copy {
  flex: 1.1;
}

.rp-hero-title {
  font-size: 1.9rem;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  color: var(--chat-text-light);
}

@media (min-width: 768px) {
  .rp-hero-title {
    font-size: 2.3rem;
  }
}

.rp-hero-subtitle {
  font-size: 1rem;
  color: var(--chat-text-secondary);
  margin-bottom: 0.75rem;
}

.rp-hero-lead {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--chat-text-primary);
  max-width: 34rem;
  margin-bottom: 1.25rem;
}

.rp-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.badge {
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  background: rgba(13, 110, 253, 0.18);
  color: var(--chat-text-light);
  border: 1px solid rgba(13, 110, 253, 0.4);
}

.rp-hero-panel {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.rp-hero-card {
  width: 100%;
  background: linear-gradient(145deg, rgba(13, 110, 253, 0.18), rgba(5, 17, 29, 0.95));
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: var(--chat-shadow-heavy);
  border: 1px solid rgba(13, 110, 253, 0.45);
}

@media (min-width: 900px) {
  .rp-hero-card {
    padding: 1.5rem 1.5rem 1.6rem;
  }
}

.rp-hero-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.rp-hero-card-sub {
  font-size: 0.85rem;
  color: var(--chat-text-secondary);
  margin-bottom: 0.9rem;
}

/* Buttons */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--chat-transition);
}

.btn-primary {
  background: var(--chat-accent-blue);
  color: var(--chat-text-light);
  box-shadow: var(--chat-shadow-medium);
}

.btn-primary:hover {
  background: #0b5ed7;
  box-shadow: var(--chat-shadow-heavy);
}

.btn-outline {
  background: transparent;
  color: var(--chat-text-light);
  border-color: rgba(233, 236, 239, 0.4);
}

.btn-outline:hover {
  border-color: var(--chat-accent-blue);
  background: rgba(13, 110, 253, 0.12);
}

.btn-full {
  width: 100%;
  margin-top: 0.75rem;
}

/* Form */
.rp-trip-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.85rem;
}

.rp-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rp-form-field {
  flex: 1;
  min-width: 0;
}

.rp-form-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  color: var(--chat-text-secondary);
}

.rp-form-field input,
.rp-form-field select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(222, 226, 230, 0.35);
  background: rgba(1, 12, 23, 0.85);
  color: var(--chat-text-light);
  font-size: 0.85rem;
}

.rp-form-field input::placeholder {
  color: rgba(213, 217, 220, 0.7);
}

.rp-form-field input:focus,
.rp-form-field select:focus {
  outline: none;
  border-color: var(--chat-accent-blue);
  box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.4);
}

.rp-form-row-toggles {
  justify-content: space-between;
  gap: 0.75rem;
}

.rp-toggle-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 1 1 46%;
}

.rp-toggle-label {
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .rp-toggle-field {
    flex: 1;
  }
}

/* Toggle switch base style (relies on existing theme styles but safe to define) */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(173, 181, 189, 0.5);
  transition: var(--chat-transition);
  border-radius: 34px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--chat-text-light);
  transition: var(--chat-transition);
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background-color: var(--chat-accent-blue);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(18px);
}

.rp-form-hint {
  font-size: 0.75rem;
  color: var(--chat-text-secondary);
  margin-top: 0.4rem;
}

.rp-form-status {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.rp-form-status--success {
  color: var(--chat-accent-green);
}

.rp-form-status--error {
  color: var(--chat-accent-red);
}

/* Sections */
.rp-section {
  padding: 1.25rem 0 1.75rem;
}

.rp-section-alt {
  background: radial-gradient(circle at top left, rgba(13, 110, 253, 0.12), transparent 55%);
}

.rp-section-inner {
  max-width: var(--rp-max-width);
  margin: 0 auto;
}

.rp-section-title {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--chat-text-light);
}

.rp-section-intro {
  font-size: 0.9rem;
  color: var(--chat-text-secondary);
  max-width: 40rem;
}

/* Pillars */
.rp-pillars-grid {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .rp-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .rp-pillars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.rp-pillar {
  background: rgba(1, 12, 23, 0.9);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid rgba(173, 181, 189, 0.35);
  box-shadow: var(--chat-shadow-light);
}

.rp-pillar h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.rp-pillar p {
  font-size: 0.86rem;
  color: var(--chat-text-secondary);
  margin-bottom: 0.5rem;
}

.rp-feature-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.rp-feature-list li {
  font-size: 0.84rem;
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.25rem;
}

.rp-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chat-accent-blue);
}

/* Trips section */
.rp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.refresh-trips-btn {
  white-space: nowrap;
}

.rp-trips-card {
  background: rgba(1, 12, 23, 0.92);
  border-radius: 16px;
  border: 1px solid rgba(173, 181, 189, 0.35);
  padding: 0.9rem;
  box-shadow: var(--chat-shadow-light);
}

.rp-trips-filters {
  margin-bottom: 0.65rem;
}

.rp-trips-table-wrapper {
  border-radius: 12px;
  border: 1px solid rgba(33, 37, 41, 0.8);
  background: rgba(5, 17, 29, 0.96);
  overflow: hidden;
}

.rp-trips-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rp-trips-table thead {
  background: rgba(13, 110, 253, 0.16);
}

.rp-trips-table th,
.rp-trips-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
}

.rp-trips-table th {
  font-weight: 500;
  color: var(--chat-text-light);
}

.rp-trips-table tbody tr:nth-child(even) {
  background: rgba(1, 12, 23, 0.7);
}

.rp-trips-table tbody tr:hover {
  background: rgba(13, 110, 253, 0.18);
}

.rp-trips-empty {
  padding: 0.7rem 0.8rem;
  font-size: 0.8rem;
  color: var(--chat-text-secondary);
}

.rp-trip-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(173, 181, 189, 0.6);
  font-size: 0.7rem;
}

.rp-trip-pill--access {
  border-color: rgba(25, 135, 84, 0.7);
  color: var(--chat-accent-green);
}

.rp-trip-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* CTA */
.rp-section-cta {
  padding-top: 1.5rem;
}

.rp-cta-card {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.25), rgba(5, 17, 29, 0.98));
  border-radius: 18px;
  padding: 1.3rem 1.2rem;
  border: 1px solid rgba(13, 110, 253, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .rp-cta-card {
    padding: 1.6rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.rp-cta-text h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.rp-cta-text p {
  font-size: 0.9rem;
  color: var(--chat-text-secondary);
  max-width: 32rem;
}

.rp-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Utility */
.insight {
  /* marker class for testing; no visual styles required */
}
