:root {
  --rp-bg: #f7f7f6;
  --rp-surface: #ffffff;
  --rp-text: #171717;
  --rp-muted: #8d8d8d;
  --rp-soft: #efefef;
  --rp-border: #dedede;
  --rp-border-light: #ededed;
  --rp-dark: #151515;
  --rp-radius-lg: 16px;
  --rp-radius-md: 12px;
  --rp-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --rp-container: 1120px;
}

.rp-page {
  min-height: 100vh;
  background: var(--rp-bg);
  color: var(--rp-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.rp-page * {
  box-sizing: border-box;
}

.rp-container {
  width: min(calc(100% - 40px), var(--rp-container));
  margin-inline: auto;
}

.rp-header {
  background: #fff;
  border-bottom: 1px solid var(--rp-border-light);
}

.rp-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rp-logo {
  color: #9b9b9b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  text-decoration: none;
}

.rp-portal-label {
  color: #c9c9c9;
  font-size: 13px;
  font-weight: 600;
}

.rp-shell {
  padding-block: 44px 64px;
}

.rp-tabs {
  width: min(100%, 820px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 40px;
  padding: 4px;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: 999px;
  box-shadow: var(--rp-shadow);
}

.rp-tab {
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--rp-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.rp-tab:hover,
.rp-tab:focus-visible {
  background: #f2f2f2;
}

.rp-tab.is-active {
  background: var(--rp-dark);
  color: #fff;
}

.rp-panel {
  display: none;
}

.rp-panel.is-active {
  display: block;
}

.rp-section-heading {
  margin-bottom: 24px;
}

.rp-section-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.rp-section-heading p {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--rp-muted);
  font-size: 16px;
}

/* Message panel */

.rp-message-card {
  min-height: 390px;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow);
  overflow: hidden;
}

.rp-message-nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-right: 1px solid var(--rp-border-light);
}

.rp-message-nav__items {
  display: grid;
  gap: 8px;
}

.rp-message-link {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #666;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.rp-message-link:hover,
.rp-message-link:focus-visible {
  background: #f4f4f4;
  color: var(--rp-text);
}

.rp-message-link.is-active {
  background: var(--rp-dark);
  color: #fff;
}

.rp-contact-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #9a9a9a;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.rp-contact-link:hover {
  color: var(--rp-text);
}

.rp-message-content {
  padding: 34px 36px;
}

.rp-message-panel {
  display: none;
  max-width: 650px;
}

.rp-message-panel.is-active {
  display: block;
}

.rp-message-panel h2 {
  margin: 0 0 22px;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.rp-message-panel p {
  margin: 0 0 18px;
  color: #555;
  font-size: 15px;
}

/* Emergency summary */

.rp-stats {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rp-border-light);
  color: #6e6e6e;
  font-size: 16px;
  font-weight: 600;
}

.rp-stats span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.rp-stats svg,
.rp-card-line svg,
.rp-badge svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rp-card-grid {
  display: grid;
  gap: 16px;
}

.rp-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rp-card-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rp-info-card,
.rp-care-card {
  position: relative;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-md);
  box-shadow: var(--rp-shadow);
}

.rp-info-card {
  min-height: 150px;
  padding: 18px;
}

.rp-info-card.is-featured {
  border-left: 4px solid var(--rp-dark);
}

.rp-badge {
  width: fit-content;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #f7f7f7;
  border: 1px solid var(--rp-border);
  color: #666;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.rp-badge--police {
  background: var(--rp-dark);
  border-color: var(--rp-dark);
  color: #fff;
}

.rp-badge--fire {
  background: #787878;
  border-color: #787878;
  color: #fff;
}

.rp-info-card h2 {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.rp-card-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 8px;
  color: #7a7a7a;
  font-size: 13px;
  line-height: 1.35;
}

.rp-card-line a {
  color: var(--rp-text);
  font-weight: 700;
  text-decoration: none;
}

.rp-card-line a:hover {
  text-decoration: underline;
}

.rp-card-link {
  display: inline-block;
  margin-top: 2px;
  color: #9a9a9a;
  font-size: 12px;
}

/* Urgent care */

.rp-care-groups {
  display: grid;
  gap: 34px;
}

.rp-care-group__header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  color: #9a9a9a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rp-care-group__header h2 {
  margin: 0;
  color: #777;
  font-size: 12px;
  font: inherit;
}

.rp-care-group__header span {
  letter-spacing: 0;
  text-transform: none;
}

.rp-care-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.rp-care-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.rp-card-arrow {
  color: #c9c9c9;
  font-size: 26px;
  line-height: 1;
}

/* Responsive */

@media (max-width: 900px) {
  .rp-card-grid--three,
  .rp-card-grid--two {
    grid-template-columns: 1fr;
  }

  .rp-message-card {
    grid-template-columns: 1fr;
  }

  .rp-message-nav {
    border-right: 0;
    border-bottom: 1px solid var(--rp-border-light);
  }

  .rp-contact-link {
    margin-top: 22px;
  }
}

@media (max-width: 680px) {
  .rp-container {
    width: min(calc(100% - 32px), var(--rp-container));
  }

  .rp-header__inner {
    min-height: 76px;
  }

  .rp-logo {
    font-size: 11px;
    letter-spacing: 0.32em;
  }

  .rp-portal-label {
    font-size: 13px;
  }

  .rp-shell {
    padding-block: 36px 56px;
  }

  .rp-tabs {
    width: 100%;
    display: flex;
    overflow-x: auto;
    border-radius: 22px;
    scroll-snap-type: x mandatory;
  }

  .rp-tab {
    flex: 0 0 auto;
    min-height: 48px;
    padding-inline: 22px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .rp-section-heading h1 {
    font-size: 36px;
  }

  .rp-section-heading p {
    font-size: 20px;
    line-height: 1.45;
  }

  .rp-stats {
    flex-wrap: wrap;
    gap: 18px;
    font-size: 20px;
  }

  .rp-info-card {
    min-height: 220px;
    padding: 28px;
    border-radius: 16px;
  }

  .rp-info-card h2 {
    font-size: 28px;
    line-height: 1.15;
  }

  .rp-badge {
    margin-bottom: 22px;
    padding: 8px 12px;
    font-size: 20px;
  }

  .rp-badge svg,
  .rp-card-line svg,
  .rp-stats svg {
    width: 22px;
    height: 22px;
  }

  .rp-card-line {
    gap: 14px;
    font-size: 22px;
  }

  .rp-message-content {
    padding: 28px;
  }

  .rp-message-panel h2 {
    font-size: 28px;
  }

  .rp-message-panel p {
    font-size: 17px;
  }

  .rp-care-card {
    min-height: 130px;
    padding: 24px;
  }

  .rp-care-card h3 {
    font-size: 22px;
  }
}